I know the title may be misleading so I'm going to explain what I want to do here.
I have a UIButton, a HUGE UIButton, set right after my application's background image. I configured the button to show this image with a background image I set. When the user taps the button, it gets a huge gray shadow and I really don't want that. So how can I m开发者_高级运维ake a button that will maintain it's state no matter what the user tries to do with it? I really don't want it to change at all when the user interacts with it. In fact, I wanted to use an UIImageView instead just to avoid the button animation. Since I couldn't get taps out of the UIImageView, I decided to use a button, but no matter what I touch in IB, the button keeps getting that gray shadow, and I have configured the Selected State and other states to be exactly as my default state.
Figured it out.
glassBackground.adjustsImageWhenHighlighted = NO;
Ideally, I would have loved to do that with IB but I'm happy with this result.
精彩评论