Can you use a UIButton instead, using the "selected" state to mean "on"?
Custom On/Off Image iOS 7.0 UI Switch
Domanda
In iOS 7 switches don't allow custom on/off images by default. While I can still set them in the Interface Builder it doesn't show up.
The transition guide merely notes that it isn't on by default anymore. Presumably there is a way to change that so I do use the images I have.
Soluzione
Altri suggerimenti
Apple never let this feature go live... I believe you can file a bug report about it if you want to see it in the future...
I've got around this issue by using a drop in replacement called SevenSwitch.
Download these two files:
SevenSwitch.h
SevenSwitch.m
Include them to your project, it is very easy for customizing.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow