I'm trying to set the UISwitch selected value and it's not responding!
Here is my code
I set the value to UISwitch. Default value is False.
[mailSwitch setSelected:TRUE];
Can someone help me.
The property you’re looking for is on
; in method form, -setOn:
or -setOn:animated:
.
selected
is a generic property, declared on UIControl, which has no visible effect on a UISwitch.
Would be something like this
[mailswitch setOn:YES animated:YES];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With