Can anyone help with how to make a button unselected after I press another button.
I have 3 buttons and do not know how to make previous button look like unselected in switch case, after touch they change state to selected Yes and change their pics.
-(IBAction)pencilPressed:(id)sender{
UIButton *pressedButton = (UIButton*)sender;
switch(pressedButton.tag)
{
case 0:
pressedButton.selected=YES;
red = 255.0/255.255;
green = 0.0/255.255;
blue = 0.0/255;
break;
case 1:
pressedButton.selected=YES;
red = 0.0/255.255;
green = 0.0/255.255;
blue = 255.0/255;
}
}