2

enter image description here

Is there any chance of getting this above switch implemented? Any reference source would be helpful.

Ganesh Nayak
  • 802
  • 11
  • 38
  • possible duplicate of [Custom UISwitch & App Store approval](http://stackoverflow.com/questions/694848/custom-uiswitch-app-store-approval) – Cody Gray - on strike May 18 '12 at 10:52
  • If you mean *natively* implemented by the SDK, no, I wouldn't hold your breath. But you can easily change the caption on the `UISwitch` control yourself if you want. – Cody Gray - on strike May 18 '12 at 10:52
  • If you have a second look at this, here both the labels Yes-No are visible at the same time. – Ganesh Nayak May 18 '12 at 11:11
  • 1
    Hmm, I see. Why would you want to do that? That sort of misses the whole point of a switch control. – Cody Gray - on strike May 18 '12 at 11:12
  • why was this voted down to -2? I'm giving it and the answer +1. I was looking for something similar and this question and answer served me well – Rhubarb Nov 12 '12 at 16:24
  • It was probably down voted because this type of switch goes against Apple's HIG. You should never display a segmented control or switch where the user will not be able to tell when the switch is "On" or "Off". If I were someone who hadn't used switches in an iOS application before, I would not be able to tell what's "On" or "Off" in the image above. – w3bshark Mar 07 '13 at 21:21

3 Answers3

6

You can create Custom switch button with the Help of image. Create a switch button (Set Alpha below to 1) and place a image above UISwitch it will work perfect.

https://github.com/samvermette/SVSegmentedControl

https://github.com/samsoffes/sstoolkit

https://github.com/alinux/iPhone-custom-switch-UIView

Mangesh
  • 2,257
  • 4
  • 24
  • 51
3

This isn't going to be an answer to solve your question, as it is going to be more of a piece of UX advice.

This type of switch goes against Apple's HIG.

You should never display a segmented control or switch where the user will not be able to tell when the control/switch is "On" or "Off". If I were someone who hadn't used switches in an iOS application before, I would not be able to tell what's "On" or "Off" in the image above. It may be easy for you to determine this, but you need to consider the possibility of someone (with less intuition than you) using your application.

Hope this helps.

w3bshark
  • 2,700
  • 1
  • 30
  • 40
0

Take a look at this replacement UISwitch project.

Mat
  • 7,613
  • 4
  • 40
  • 56
  • In DCRoundSwitch, the switch shows up one label at a time, either Yes or No. But this switch above is weird one. :( – Ganesh Nayak May 18 '12 at 11:12