   override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
     super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
 
-    transitionController.transitionType = ModalDialogTransition.self
+    if #available(iOS 9.0, *) {
+      transitionController.transitionType = ModalDialogTransition.self
+    } else {
+      // Fallback on earlier versions
+    }
 
     modalPresentationStyle = .overCurrentContext
   }

  }
}

class ModalDialogTransition: SelfDismissingTransition {

  required init() {}

    }

    let bounds = ctx.containerView().bounds
    let backPosition = CGPoint(x: bounds.midX, y: bounds.maxY + size.height * 3 / 4)
    let forePosition = CGPoint(x: bounds.midX, y: bounds.midY)

    var firstPan = ctx.gestureRecognizers.first { $0 is UIPanGestureRecognizer }
    let draggable: Draggable
    if let firstPan = firstPan as? UIPanGestureRecognizer {
      draggable = Draggable(.withExistingRecognizer(firstPan))
    } else {
      draggable = Draggable()
    }

    let reactiveForeLayer = runtime.get(ctx.fore.view.layer)
    let position = reactiveForeLayer.position

    let gesture = runtime.get(draggable.nextGestureRecognizer)
    let centerY = ctx.containerView().bounds.height / 2.0
    runtime.add(gesture
      .velocityOnReleaseStream()
      .y()
      .thresholdRange(min: -100, max: 100)
      // If one of rewrite's target values is a stream, then all the target values must be
      // streams.
      .rewrite([.whenBelow: createProperty(withInitialValue: .forward).asStream(),
                .whenWithin: position.y().threshold(centerY).rewrite([.whenBelow: .forward,
                                                                      .whenAbove: .backward]),
                .whenAbove: createProperty(withInitialValue: .backward).asStream()]),
                to: ctx.direction)

    let movement = TransitionSpring(back: backPosition,
                                    fore: forePosition,
                                    direction: ctx.direction,
                                    threshold: 1,
                                    system: coreAnimation)
    let tossable = Tossable(spring: movement, draggable: draggable)
    runtime.add(tossable, to: ctx.fore.view)

    return [tossable.spring]
  }

  static func willPresent(fore: UIViewController, dismisser: ViewControllerDismisser) {
