iphone - UITapGestureRecognizer problem

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-04-07T19:20:53Z Indexed on 2010/04/07 19:23 UTC
Read the original article Hit count: 1012

Filed under:
|
|

I have two UIImageViews one as subview of the other. The subview is smaller and is centered on the screen.

Both have UITapGestureRecognizer assigned and both were intended to respond to single taps.

A single tap on the main view (= the area outside the subview) is fine, but a tap inside the subview is seen as the main view as a tap too. How can I have this to work independently?

both views have setCancelsTouchesInView and setDelaysTouchesEnded set to NO and both have the same delegate (yes, I need to have the same delegate and cannot change that).

How may I force the main view to ignore any tap on the area that belongs to its subview?

thanks for any help.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk