Don’t use setAlternateColor: on UISwitch
March 3, 2011 § 1 Comment
According to Apple documentation, it is recommended not to change UISwitch.
By default UISwitch shows a blue button with “ON” label and white button with “OFF” label. API won’t allow you to change the font name, font size, font style, font color, button color on UISwitch.
Even though there are many examples on how to use setAlternateColor: method to change the default UISwitch button from blue color to orange color, this is not recommended. Your app will be rejected if you use it.
The UISwitch class is not customizable.
You would have to build your own custom switch. It is in general difficult to subclass UIControl and reimplement UISwitch. There are other work around approaches to recreate Switch using png images.