我正在开发一个应用程序。它的核心是UIViewController
类似路径的样式(左右滑动会导致视图移动以及出现左右控制器)所以在我使用的中央(根)viewController 上UIPageViewController
。我这样初始化
self.pageViewController = [[UIPageViewController alloc]
initWithTransitionStyle: UIPageViewControllerTransitionStyleScroll
navigationOrientation: UIPageViewControllerNavigationOrientationHorizontal
options: @{UIPageViewControllerOptionInterPageSpacingKey: @30}];
UIGestureRecognizer
我知道我在UIPageViewController
使用时找不到任何UIPageViewControllerTransitionStyleScroll
. 我面临的问题是:当我UIPanGestureRecognizer
的左右滑动处于活动状态时,它会按照我的假设进行 - 左右菜单出现在屏幕上,但此时此刻
UIPageViewController
滚动页面。
所以我想在UIPageViewController
我的UIPanGestureRecognizer
句柄菜单出现时阻止这种滚动和页面转换。
换句话说 - 有什么方法可以防止页面转换UIPageViewController
?