UIButton Images Pressed and Not-Pressed
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.
精彩评论