1

Possible Duplicate:
How to customize UISwitch button in iphone?

How to change name of UISwitch (like on,off) i am creating UISwitch in Xib so i want to change the name like yes or no.

Community
  • 1
  • 1
  • You could just use a custom UISegmentedControl as described [here on SO](http://stackoverflow.com/questions/5087546/how-to-customize-uiswitch-button-in-iphone) – Abizern Sep 29 '11 at 12:36
  • But i am creating UISwitch in Interface builder so possivle to change text in UISwitch Text – ravikumar karunanithi Sep 29 '11 at 12:39

3 Answers3

2

You will have to create a custom switch...

http://www.catamount.com/blog/1063/uicustomswitch-customizing-uiswitch-color-it-change-labels/

this should help

Ankit Srivastava
  • 12,347
  • 11
  • 63
  • 115
2

There is no public API method for changing the text on an UISwitch

You should use a UISegmentedControl or a Custom UISwitch

rckoenes
  • 69,092
  • 8
  • 134
  • 166
0

This one I found is very useful for creating the custom switch

http://osiris.laya.com/projects/rcswitch/

You can create the custom switch and there will not be any problem in apple approval.

UPT
  • 1,490
  • 9
  • 25