I looked at the stack overflow to answer this question, and I can only find ways that worked on 4.1 and lower, but for 4.2.1 and higher I cannot find a new way to get the text ON and OFF to change. Is there a way to change it to say yes and no. This is what I have:
UISwitch *switchControl = [[UISwitch alloc] initWithFrame:frame];
[switchControl addTarget:self action:action forControlEvents:UIControlEventValueChanged];
switchControl.backgroundColor = [UIColor clearColor];
switchControl.on = value;
[cell addSubview:switchControl];
[switchControl release];
What would be the easiest way to change UISwitch text? Or it would be easier if I had to make two images and use animation to make them flow, for example, this is a normal UISwitch.
source
share