Skip to content

Instantly share code, notes, and snippets.

@ohlulu
Created June 20, 2019 14:47
Show Gist options
  • Save ohlulu/c17bd88039f0f3d85ecaef29d9a83743 to your computer and use it in GitHub Desktop.
Save ohlulu/c17bd88039f0f3d85ecaef29d9a83743 to your computer and use it in GitHub Desktop.
class PrepareToPushViewController: UIViewController {
let button = UIButton(type: .system)
let animation = CustomTransition()
override func viewDidLoad() {
super.viewDidLoad()
// set view layout
}
}
}
// MARK: Setup UI methods
extension PrepareToPushViewController {
@objc func buttonPressed() {
let vc = PresentSecondViewController()
animation.destinationPoint = button.center
vc.transitioningDelegate = animation
vc.modalPresentationStyle = .custom
animation.interation.wire(viewController: vc)
present(vc, animated: true, completion: nil)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment