document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. import UIKit
  2.  
  3. class ViewController: UIViewController {
  4.   @IBOutlet weak var olImageView: UIImageView!
  5.  
  6.   override func viewDidLoad() {
  7.     super.viewDidLoad()
  8.    
  9.     // Enable Hero for transitions
  10.     navigationController?.hero.isEnabled = true
  11.  
  12.     // Define the transition type for present new screens
  13.     navigationController?.hero.navigationAnimationType = .fade
  14.  
  15.     // Set an id to the OrangeLoops Image View
  16.     olImageView.hero.id = "OrangeLoops-Logo"
  17.   }
  18.  
  19.   @IBAction func navigateToSecondViewController(_ sender: Any) {
  20.     if let viewController =
  21.       self.storyboard?.instantiateViewController(identifier: "SecondViewController") as? SecondViewController {
  22.       navigationController?.pushViewController(viewController, animated: true)
  23.     }
  24.   }
  25. }
');