Reputation: 6247
My view hierarchy looks like this:
-UIScrollView
---UIView
------CustomUIView
------CustomUIView
I have implemented touchesBegan
in CustomUIView, but it's not getting called.
Can someone please tell me how I can get my CustomUIView to detect touches?
Upvotes: 3
Views: 4550
Reputation: 1023
You may have solved this now but I had a similar problem and solved it so hopefully my experience can help anyone else with a similar issue.
In my case I had exactly the same setup my CustomUIView was capturing the touch events. In order to have UIView receive any touch events I needed to make a call to
[super touchesEnded:touches withEvent:event];
from the CustomUIView. Hope this helps!
Upvotes: 1
Reputation: 828
Try the following and check:
[scrollView setCanCancelContentTouches:NO];
Upvotes: 2