Fix crash on presenting pan modal over pan modal
Opened this issue · 0 comments
ppamorim commented
https://github.com/slackhq/PanModal/pull/176/files
func haltScrolling(_ scrollView: UIScrollView) {
let point = CGPoint(x: 0, y: min(scrollViewYOffset.rounded(), scrollView.contentSize.height))
if presentedViewController.isPanModalPresented && point != scrollView.contentOffset {
scrollView.setContentOffset(point, animated: false)
scrollView.showsVerticalScrollIndicator = false
}
}
@objc
open var isPanModalPresented: Bool {
return (transitioningDelegate as? PanModalPresentationDelegate) != nil
}