Reputation: 3768
i hav a more buttons on my scrool view so if one of them clickrd i just want to highlight the button untill the any of the button clicked again....
so i just want to show the button in clicked mode......
thanks in advance.....
Upvotes: 0
Views: 962
Reputation: 6465
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.
Upvotes: 0
Reputation: 23722
Set the button's highlighted property to YES:
myButton.highlighted = YES;
Upvotes: 1