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?
Try the following and check:
[scrollView setCanCancelContentTouches:NO];
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With