I am trying to use a UISwitch controller but set its default text to “Yes/No” instead of “On/off”. What is the easiest way to do that? Well is it doable?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unfortunately in german language, but the source code is readable and it works well:
http://www.mobile-dev.de/iphone-code-schnipsel/34-iphone-user-interface/192-aendern-des-textes-von-uiswitch-elementen.html
But you should read the documentation:
http://developer.apple.com/library/ios/#documentation/uikit/reference/UISwitch_Class/Reference/Reference.html
The UISwitch class is not customizable.I do not know if it is allowed and you will get trouble in the Apple approval process.