How do I Disable the swipe gesture of UIPageViewCo

2019-01-04 07:58发布

In my case parent UIViewController contains UIPageViewController which contains UINavigationController which contains UIViewController. I want to add a swipe gesture to the last view controller, but swipes are handled as if they belong to page view controller. I tried to do this both programmatically and via xib but with no result.

So as I understand I can't achieve my goal until UIPageViewController handles its gestures. How to solve this issue?

13条回答
放我归山
2楼-- · 2019-01-04 08:22

Translating @user2159978's response to C#:

foreach (var view in pageViewController.View.Subviews){
   var subView = view as UIScrollView;
   if (subView != null){
     subView.ScrollEnabled = enabled;
   }
}
查看更多
登录 后发表回答