 
 class ViewController: UIViewController {
 
-  override func viewDidLoad() {
+  lazy var transition: Transition = {
     let transition = Transition() { controller, show in
       controller.view.transform = show
         ? CGAffineTransformIdentity


      controller.view.alpha = show ? 1 : 0
    }

    transitioningDelegate = transition
    modalPresentationStyle = .Custom

    title = "Transition Demo"

  func presentController() {
    let controller = UIViewController()
    controller.view.backgroundColor = UIColor.greenColor()
    controller.transitioningDelegate = transition
    controller.view.alpha = 0.0

    presentViewController(controller, animated: true, completion: nil)
  }
}
