Open UtkuDalmaz opened 6 years ago
You can achieve this by cancelling the pan when the drag offset becomes negative.
class HalfModalPresentationController: UIPresentationController {
// ...
func onPan(pan: UIPanGestureRecognizer) -> Void {
let endPoint = pan.translation(in: pan.view?.superview)
guard endPoint.y > 0 else {
return pan.state = .cancelled
}
// ...
}
// ...
}
Hi there
How can I prevent modal viewcontroller to be fullscreen?