How to stop UIScrollView from swallowing touches

I have a UIScrollView that has many subzones. When I scroll, I want to use the sub that I want to drag. Is there a possible way to stop the UIScrollView from swallowing touches? Or can you start a new touch when you cancel the scrolling (for example, that it scrolls and I clicked on it, the subview will be listened to so that I can pull it out)?

+1
source share
1 answer

Subclass UIScrollView and override the method - (BOOL)touchesShouldCancelInContentView:(UIView *)view . Here is an example with which you can go through uibutton:

 #import "scrollViewWithButtons.h" @implementation scrollViewWithButtons - (BOOL)touchesShouldCancelInContentView:(UIView *)view { return ![view isKindOfClass:[UISlider class]]; } @end 
+2
source

All Articles