Created
June 20, 2019 14:47
-
-
Save ohlulu/c17bd88039f0f3d85ecaef29d9a83743 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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