0xSina
0xSina

Reputation: 21593

UIbutton not responding to touch

I have this view hierarchy: enter image description here

The three buttons don't response. They are enabled, just when I touch there, they don't do anything (not even change their gradient/tint) which tells me they are not even received the touches. Is there something I am doing wrong? Thanks

User interaction is enabled on all the buttons' superviews, and the buttons themselves. The buttons are also enabled.

Upvotes: 1

Views: 3956

Answers (1)

SushiGrass Jacob
SushiGrass Jacob

Reputation: 19834

Are you using any imageViews on top or containing the UIButtons? If so, sometimes, those absorb the touches because they have the userInteraction boolean set to NO by default. Maybe even getting rid of your gradient imageView (for the time being) to determine if those are causing the issues.

If not, I would set a breakpoint on the viewDidLoad method of the superview and type in [self.view recursiveDescription]. It should give you at-a-glance overview of what's around those buttons and might be stealing the touches.

Good luck!

Upvotes: 6

Related Questions