views:

24

answers:

1

Hello,

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

A: 

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.

Toro
Thanks Toro I'll have a look at this right now
mat5454
OK I found the solution! I loaded my first view using a NIB with a frame (0,0,320,460) whereas the appearance was good. I changed to (0,0,320,480) and it worked perfectly ! Thank you so much !
mat5454