我有两个 UISwitch....当第二个打开时我需要关闭第一个 当第二个关闭时也打开第一个......
同样,当第一个打开时,第二个将关闭,副varca...
有什么想法吗?
最佳答案
为两个开关添加 IBAction
- (IBAction)toggleForFirstSwitch
{
[secondSwitch setOn:!firstSwitch.on animated:YES];
}
- (IBAction)toggleForSecondSwitch
{
[firstSwitch setOn:!secondSwitch.on animated:YES];
}
或者类似的东西:)
关于iphone - 切换两个 UISwitch,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3467233/