Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import UIKit
- class ViewController: UIViewController {
- @IBOutlet weak var olImageView: UIImageView!
- override func viewDidLoad() {
- super.viewDidLoad()
- // Enable Hero for transitions
- navigationController?.hero.isEnabled = true
- // Define the transition type for present new screens
- navigationController?.hero.navigationAnimationType = .fade
- // Set an id to the OrangeLoops Image View
- olImageView.hero.id = "OrangeLoops-Logo"
- }
- @IBAction func navigateToSecondViewController(_ sender: Any) {
- if let viewController =
- self.storyboard?.instantiateViewController(identifier: "SecondViewController") as? SecondViewController {
- navigationController?.pushViewController(viewController, animated: true)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment