views:

855

answers:

3

The UISwitch currently says ON and OFF. Can I change the text YES and NO?

Would it be hard? Or do i just rephrase the question i ask the user?

A: 

http://nan-technicalblog.blogspot.com/2008/10/iphone-how-to-customize-uiswitchs-text.html a

Sam Jarman
Broken link, the blogger did deleted his account or this specific entry. :( anyone else?
Rigo Vides
A: 

To change the text of an UISwitch e.g. to "Foo/Bar", do the following:

((UILabel *)[[[[[[_agreeAgb subviews] lastObject] subviews] objectAtIndex:2] subviews] objectAtIndex:0]).text = @"Foo";
((UILabel *)[[[[[[_agreeAgb subviews] lastObject] subviews] objectAtIndex:2] subviews] objectAtIndex:1]).text = @"Bar";
oldbread