Is there any way to change the background of a uibutton while it is highlighted and then have it revert back to original state?

有帮助吗?

解决方案

You can set an image in the utilities panel at the right-side of your screen.

enter image description here

Or use this code:

[button setImage:[UIImage imageNamed:@"pressed.png"] forState:UIControlStateSelected | UIControlStateHighlighted];
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top