Reputation: 2171
I have a view with several buttons on it. when one of these buttons is clicked, an Image View pops up over all of the other buttons. Even though the image is covering all of the buttons, they are still clickable. Is there a way in XIB to make it so that a user can't click through an Image View? I know I could go in programmatically and disable/enable the buttons one at a time, but I am sure there is a simpler way to do this. Any ideas? Thanks!
One of the recommendations below is that I enable user interaction on the image. However, I am still able to click buttons below the image view. Please see the image as an example.
Upvotes: 1
Views: 1429
Reputation: 14304
Mark the UIImageView
's userInteractionEnabled
property as YES. This way, it will "steal" the touch events away from the underlying UIButton
Upvotes: 8