mat5454
mat5454

Reputation: 35

UIView Touch event at the bottom of the screen not fired

I am encountering a strange problem. I created a UIView that takes place at the bottom of the screen (0,431,320,49) and then I want to deal with touch events.

When I touch the upper side of the UIView, it works. But when I touch the bottom side (I mean, more than 20px in relative position), the touchBegan event is not fired.

It sounds like I have a problem with the network status bar that would change in some way the behavior of my code.

Does someone have any idea?

Regards,

Mathieu

Upvotes: 3

Views: 882

Answers (1)

AechoLiu
AechoLiu

Reputation: 18368

Maybe there is a transparent view above your UIView, it receives the touch event, and it does not pass those events to the view below it. Or, another case I encountered, I assign the wrong frame to my view. The above views have a good looking, and touch event cannot be received at some point that is not contained in the wrong frame.

For example, I assigned frame (10,10,300,280) to my viewController's view, and add a subview with frame (0, 0, 320, 480) to the view. So the subview looks well, but touch event at point (0, 0) cannot be received.

Upvotes: 3

Related Questions