   }
 }
 
-class ModalDialogTransition: SelfDismissingTransition {
+class ModalDialogTransition: SelfDismissingTransition, TransitionWithPresentation {
+
+  public func defaultModalPresentationStyle() -> UIModalPresentationStyle? {
+    return .custom
+  }
+
+  public func presentationController(forPresented presented: UIViewController,
+                                     presenting: UIViewController?,
+                                     source: UIViewController) -> UIPresentationController? {
+    return ModalDialogPresentationController(presentedViewController: presented,
+                                             presenting: presenting)
+  }
+
 
   func willBeginTransition(withContext ctx: TransitionContext, runtime: MotionRuntime) -> [Stateful] {
     let size = ctx.fore.view.frame.size

    dismisser.dismissWhenGestureRecognizerBegins(pan)
  }
}

    super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)

    transitionController.transition = ModalDialogTransition()
  }

  required init?(coder aDecoder: NSCoder) {
