I have four buttons. I want that selected button keep highlighted till other button is selected. After that other button gets highlighted and first button unhighlighted.
- (void)doHighlight:(UIButton*)b {
[b setHighlighted:YES];
}
-(IBAction)sizeBtnClicked:(UIButton*)btn{
[self performSelector:@selector(doHighlight:) withObject:btn afterDelay:0];
}
My problem is after selecting other button first button does not unhighlight.please guide me how to do it.
declare a variable button
tempBtnin your .h , alloc it and then perform this.