i hav a more buttons on my scrool view so if one of them clickrd i just want to hi开发者_运维百科ghlight the button untill the any of the button clicked again....
so i just want to show the button in clicked mode......
thanks in advance.....
Set the button's highlighted property to YES:
myButton.highlighted = YES;
Use these two lines:
[myButton setBackgroundImage: [UIImage imageNamed:@"myImage.png"]];
myButton.highlighted = YES;
Dont use:
[myButton setImage: [UIImage imageNamed:@"myImage.png"]];
This will hide the highlighting of button.
精彩评论