我想将 UISwitch on 更改为 off 并将 off 更改为 on,但我不能。在 xib 中创建了 UISwitch。
- (IBAction)switchAction:(id)sender {
UISwitch *nkswitch = (UISwitch *)sender;
if (nkswitch.isOn)
NSLog(@"switchPressed ON");
else
NSLog(@"switchPressed OFF");
}
有什么解决办法吗?
更新