Last active
November 17, 2017 12:22
-
-
Save acalism/af8d73e7413a485e2cf012b714e87f75 to your computer and use it in GitHub Desktop.
scrollView页面如何不影响屏幕左边缘返回手势
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 如果 UIViewController.view.addSubView(scrollView),会导致屏幕左边缘的返回手势失效。 | |
| // 解决办法如下: | |
| if let ges = navigationController?.interactivePopGestureRecognizer { | |
| scrollView.panGestureRecognizer.require(toFail: ges) // 允许左边缘手势返回 | |
| } | |
| // 对于 UIPageViewController,可以先找到其 scrollView,再如法炮制 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment