A UIScrollView scroll event blocks other UIView animations, so in the case of Twitter, they probably UIView a second before scrolling. As you asked in your question:
"How do I cancel scrollviews if the UIPageViewController tries to use this gesture to rotate the page by clicking or panning the page to trigger a page rotation animation?"
I suggest a workaround.
Instead of relying on the UIPageViewController inherent UIPanGestureRecognizer , include your own UIPanGestureRecognizer in the page view so that when the panorama is detected in the appropriate section of the page and executed in the appropriate direction, this new UIPanGestureRecognizer overrides the UIPageViewController UIGestureRecognizer and starts. In particular, you need to:
(1) Stop the scroll animation with
CGPoint offset = scrollView.contentOffset; [scrollView setContentOffset:offset animated:NO];
(2) Programmatically rotate the page using
- (void)setViewControllers:(NSArray *)viewControllers direction: (UIPageViewControllerNavigationDirection)direction animated: (BOOL)animated completion:(void (^)(BOOL finished))completion;
so that both scroll animations are stopped and page turning is completed in a single fluid gesture.
source share