mySwitch = [[UISwitch alloc] initWithFrame: CGRectMake( width - 55, height * .5 - 15, 100, 20)];
[mySwitch setOn: YES animated: YES];
mySwitch.transform = CGAffineTransformMakeScale( .75, .75);
mySwitch.onTintColor = RGBACOLOR( 99, 155, 0, 1);
温馨提示:内容为网友见解,仅供参考