Linux world
Linux world

Reputation: 3768

any way to show the button in highlight mode

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

Answers (2)

Developer
Developer

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

Costique
Costique

Reputation: 23722

Set the button's highlighted property to YES:

myButton.highlighted = YES;

Upvotes: 1

Related Questions