I am trying to set a switch to turn off another switch when it is on. I know you use a if statement to do this, but I find it to be very different than an HTML if statement. I know my code is not right but it will explain what I need.
- (IBAction)dashieScheme:(id)sender {
if(dashieScheme.state = true) {
(twilightScheme.state = false);
}
}
- (IBAction)twilightScheme:(id)sender {
if(twilightScheme:(id)sender ) {
(dashieScheme.state = false);
}
}
You want to use the following:
Also, your if statement needs some work. You want to use == to check for equality. a single = sign is for assignment.