Reputation: 1229
I have two UISwitch....and i need to turn off the first one when the second one is turn on and also turn on the first one when the second one is off....
similarly when first is on second will go off and vice varca...
any idea??
Upvotes: 2
Views: 738
Reputation: 44053
Add an IBAction for both switches
- (IBAction)toggleForFirstSwitch
{
[secondSwitch setOn:!firstSwitch.on animated:YES];
}
- (IBAction)toggleForSecondSwitch
{
[firstSwitch setOn:!secondSwitch.on animated:YES];
}
or something like that anyway :)
Upvotes: 2