UIPageViewController inside KYDrawerController
schmidan opened this issue · comments
Dani commented
Has anyone gotten this to work?
The UIPageViewController with UIPageViewControllerTransitionStyle.scroll
and UIPageViewControllerNavigationOrientation.horizontal
"steals" away the ScreenEdgePanGesture.
Does anyone know how to prevent this?
much obliged
Dani commented
this issue can be closed
if anyone is interested.
the magic is in gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldBeRequiredToFailBy otherGestureRecognizer: UIGestureRecognizer)
i solved it by using my own subclass of KYDrawerController (could also be an extension but i need the subclass for other reasons as well)
class KYDrawerControllerTeamup: KYDrawerController {
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldBeRequiredToFailBy otherGestureRecognizer: UIGestureRecognizer) -> Bool {
guard let scrollView = otherGestureRecognizer.view as? UIScrollView else {
return false
}
let needsToFail = scrollView.contentSize.height <= scrollView.frame.height
return needsToFail
}
}