I have the main wiev. I have placed a UIScrollView object as a subview of the main view. I have an extended class from UIView, which manage touch events. This class models a sort of transparent blackboard, in which the user can draw a path. I create an object out of my UIVIew extended class and I add it as a subview of the UIScrollView.
I carry out this process by using the Inspector and .xib file.
Then, no touch event gets to the UIScrollView object. No matter if I uncheck "User Interaction Enabled" checkbox for my UIView extended class in the Inspector. I've also tried with :
[[self nextResponder] touchesBegan:touches withevent:event];
or
[[self.superview nextResponder] touchesBegan:touches withevent:event];
or
[super touchesBegan:touches withEvent:event];
or
[super touchesBegan:touches withEvent:event];
in the touchEvents methods of my extended UIView class. I haven't succeeded in getting touch events to the UIScrollView.
On the other hand, if I add scrollView and my extended UIView class programatically, maintaining the same hierarchy, UIScrolView get touch events, but not its subview (my UIView extended class).
I don't want both UIScrollView and my UIView extended class to manage touch events at the same time. I just want to toggle between UIScrollView and my UIView extended class for listening to touch evebnts, by using a button for example.
Is it possible, in this case I am explaining, to select which, UIScrollView or my UIView extended class, should listen to touch events?