开发者

UIButton Images Pressed and Not-Pressed

开发者 https://www.devze.com 2023-03-26 07:13 出处:网络
I have a bunch of UIButtons mimicking actual arcade-style buttons. For some reason I remember seeing s开发者_如何学Comewhere that I can have the button use a different image when it is pressed and wh

I have a bunch of UIButtons mimicking actual arcade-style buttons.

For some reason I remember seeing s开发者_如何学Comewhere that I can have the button use a different image when it is pressed and when it is not pressed. I just can't find it now that I actually need it... think it was somewhere in IB.

I haven't declared them programmatically so if that's where the option lies I'm SOL.


If you look in the attributes inspector for a button in IB, you'll see a drop-down list labelled "State Config" in the same group as the "Image" attribute. The options in this list are "Default", "Highlighted", "Selected" and "Disabled" - choose one of these, then select an image to set it for that state.

0

精彩评论

暂无评论...
验证码 换一张
取 消