Skip to content

Instantly share code, notes, and snippets.

@sagaya
Created August 22, 2019 14:01
Show Gist options
  • Save sagaya/fbb50eab93fdf4dfe2ed282f9da1ab3b to your computer and use it in GitHub Desktop.
Save sagaya/fbb50eab93fdf4dfe2ed282f9da1ab3b to your computer and use it in GitHub Desktop.
import UIKit
class FirstViewController: UIViewController {
let transitionDelegate: UIViewControllerTransitioningDelegate = TransitionAnimation()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
@IBAction func didTapPush(_ sender: Any) {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
if let controller = storyboard.instantiateViewController(withIdentifier: "secondController") as? SecondViewController{
transitioningDelegate = self.transitionDelegate
controller.transitioningDelegate = self.transitionDelegate
present(controller, animated: true, completion: nil)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment