문제

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.

https://developer.apple.com/library/ios/documentation/userexperience/conceptual/TransitionGuide/TransitionGuide.pdf

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.

도움이 되었습니까?

해결책

Can you use a UIButton instead, using the "selected" state to mean "on"?

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top