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

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

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -