UISwitch - change from on/off to yes/no

does anyone know of a way I can change the text label for on and off to yes and no.

I did it with

            ((UILabel *)[[[[[[switchControl subviews] lastObject] subviews] objectAtIndex:2] subviews] objectAtIndex:0]).text = @"Yes";
        ((UILabel *)[[[[[[switchControl subviews] lastObject] subviews] objectAtIndex:2] subviews] objectAtIndex:1]).text = @"No";

However, with the release of iOS 4.2, this is no longer supported (this probably wasn't recommended by Apple anyway)

My client is insisting on yes/no switches. I'd appreciate any advice!

many thanks

18
задан krisdyson 1 December 2010 в 14:10
поделиться