couldn\'t find a solution for that.
I am building an app, with big scroll view, who has paging (Horizontal). Inside this scroll view, there is a grid of UIView\'s, and a
@stanislaw, I've just tried the solution you suggest on an iPhone device.
I see your problem.
Your code does prevent occasional scrolls of vertical views but I believe it is not the simultaneous gesture recognition does the job - comment the entire code you provide for inner views and use the code for the outer scroll view with the following modification:
@interface OuterHorizontalScrollView : UIScrollView ...
@property (weak) InnerVerticalScrollView *currentActiveView; // Current inner vertical scroll view displayed.
@end
@implementation OuterHorizontalScrollView
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
if (self.currentActiveView.dragging == NO) {
self.currentActiveView.scrollEnabled = NO; // The presence of this line does the job
}
return YES;
}
- (void)scrollViewDidEndDragging:(PlacesScrollView *)scrollView willDecelerate:(BOOL)decelerate {
self.currentActiveView.scrollEnabled = YES; // This is very likely should be done for all subviews, not only a current.
}
@end