Is there a faster method than looping through a uiview's subviews and testing cgrectcontainspoint?
views:
13answers:
1
+1
A:
I haven't tried it myself, but it looks like hitTest:withEvent: will do what you want.
The doc says that it traverses the view hierarchy calling pointInside:withEvent on each subview, which probably ends up calling CGRectContainsPoint, so it's probably no faster. I'd probably still try it rather than looping through the subviews manually.
zpasternack
2010-08-11 07:48:25
I wen ahead and wrote a custom method to traverse the subview array and record the highest hit.
Don Wilson
2010-08-13 05:01:06