문제

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