cocoa touch - iPhone: Handling touches transparently -


i have uiviewcontroller , associated uiview. uiview has number of subviews.

how handle touch event inside specified rectangle in uiviewcontroller subclass?

this handling should transparent: uiview , subviews should still receive touch events if intersect specified rectangle.

p.s.

  1. overriding touchesbegan in view controller doesn't work. inner views doesn't pass events through.
  2. adding custom button end of uiview subviews list doesn't work. inner subviews doesn't receive touch events.

touchesbegan/touchesmoved/touchesended way go. depending on trying do, uigesturerecognizer may option.

to make sure subviews pass events up, set userinteractionenabled yes on subviews.

uiview sets yes default, subclasses (notably uilabel) override , set no.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -