   func presentController() {
     let controller = UIViewController()
     controller.view.backgroundColor = UIColor.greenColor()
+    controller.transitioningDelegate = transition
+    controller.view.alpha = 0.0
+
     presentViewController(controller, animated: true, completion: nil)
   }
 }


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

    transitioningDelegate = transition
    modalPresentationStyle = .Custom

    title = "Transition Demo"


class ViewController: UIViewController {

  lazy var transition: Transition = {
    let transition = Transition() { controller, show in
      controller.view.transform = show
        ? CGAffineTransformIdentity
