設定色調顏色
Objective-C
//for off-state
mySwitch.tintColor = [UIColor blueColor];
[mySwitch setTintColor: [UIColor blueColor]];
//for on-state
mySwitch.onTintColor = [UIColor cyanColor];
[mySwitch setOnTintColor: [UIColor cyanColor]];
迅速
//for off-state
mySwitch.tintColor = UIColor.blueColor()
//for on-state
mySwitch.onTintColor = UIColor.cyanColor()