25

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.

Wuzseen
  • 687
  • 3
  • 14
  • 20

3 Answers3

16

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

Kristopher Johnson
  • 81,409
  • 55
  • 245
  • 302
  • This is what ended up happening to an extent. It meant rebaking some art, but it gets the job done. – Wuzseen Oct 25 '13 at 14:49
  • Have the same problem. Before coming to this answer I used this approach, but it not as elegant as it would be with a switch element. – Patrick Bassut Apr 22 '14 at 23:50
13

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.

Jagat Dave
  • 1,643
  • 3
  • 23
  • 30
liamnichols
  • 12,419
  • 2
  • 43
  • 62
  • 2
    After a lot of research, this is the best possible solution I have found so far and is exactly what I was looking for. Thanks a lot! :) – GoGreen May 20 '14 at 08:24
3

Download these two files:

SevenSwitch.h 
SevenSwitch.m

Include them to your project, it is very easy for customizing.

Jagat Dave
  • 1,643
  • 3
  • 23
  • 30
landonandrey
  • 1,271
  • 1
  • 16
  • 26