I’m doing a UIButtion that highlight once it clicked and it is un-highlighted when it’s clicked again. I can not get to un-highlight when I click on. I have made an event listener below
(IBAction)ButtonClicked:(UIButton*)sender
{[sender setHighlighted:!sender.isHighlighted];}
Edit:
and the target action is
[button addTarget:self action:@selector(ButtonClicked:) forControlEvents:UIControlStateSelected];
[sender setSelected:!sender.isSelected]try this:) If this is what you want