Skip to content

Instantly share code, notes, and snippets.

@acalism
Last active November 17, 2017 12:22
Show Gist options
  • Select an option

  • Save acalism/af8d73e7413a485e2cf012b714e87f75 to your computer and use it in GitHub Desktop.

Select an option

Save acalism/af8d73e7413a485e2cf012b714e87f75 to your computer and use it in GitHub Desktop.
scrollView页面如何不影响屏幕左边缘返回手势
// 如果 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