Skip to content

Instantly share code, notes, and snippets.

@ohlulu
Created June 20, 2019 14:59
Show Gist options
  • Save ohlulu/33d35380955e5ce3133ed183ae88688b to your computer and use it in GitHub Desktop.
Save ohlulu/33d35380955e5ce3133ed183ae88688b to your computer and use it in GitHub Desktop.
class UpToDownIneraction: UIPercentDrivenInteractiveTransition {
// ...
func wireGesture(on viewController: UIViewController) {
presentingViewController = viewController
let gesture = UIPanGestureRecognizer(target: self, action: #selector(handleGesture(_:)))
viewController.view.addGestureRecognizer(gesture)
}
@objc func handleGesture(_ gestureRecoginizer: UIPanGestureRecognizer) {
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment