     presentionConfiguration.shadowOffset = shadowOffset
     presenter?.presentionConfiguration = presentionConfiguration
   }
-
 }


import UIKit

public class AnimatableModalViewController: UIViewController, PresentationDesignable {

  // MARK: - AnimatablePresentationController

  @IBInspectable public var presentationAnimationType: String? {
    didSet {
      setupPresenter()
    }
  }

  @IBInspectable public var dismissalAnimationType: String? {
    didSet {
      setupPresenter()
    }
  }

  @IBInspectable public var transitionDuration: Double = .NaN {
    didSet {
      presenter?.transitionDuration = transitionDuration
    }
  }

  @IBInspectable public var modalPosition: String = "Center" {
    didSet {
      presenter?.presentionConfiguration?.modalPosition = PresentationModalPosition.fromString(modalPosition)
    }
  }

  @IBInspectable public var modalWidth: String = "Half" {
    didSet {
      presenter?.presentionConfiguration?.modalSize = (PresentationModalSize.fromString(modalWidth), PresentationModalSize.fromString(modalHeight))
    }
  }

  @IBInspectable public var modalHeight: String = "Half" {
    didSet {
      presenter?.presentionConfiguration?.modalSize = (PresentationModalSize.fromString(modalWidth), PresentationModalSize.fromString(modalHeight))
    }
  }

  @IBInspectable public var cornerRadius: CGFloat = .NaN {
    didSet {
      presenter?.presentionConfiguration?.cornerRadius = cornerRadius
    }
  }

  @IBInspectable public var dismissOnTap: Bool = true {
    didSet {
      presenter?.presentionConfiguration?.dismissOnTap = dismissOnTap
    }
  }

  @IBInspectable public var backgroundColor: UIColor = .blackColor() {
    didSet {
      presenter?.presentionConfiguration?.backgroundColor = backgroundColor
    }
  }

  @IBInspectable public var opacity: CGFloat = 0.7 {
    didSet {
      presenter?.presentionConfiguration?.opacity = opacity
    }
  }

  @IBInspectable public var blurEffectStyle: String? {
    didSet {
      presenter?.presentionConfiguration?.blurEffectStyle = blurEffectStyle
    }
  }

  @IBInspectable public var blurOpacity: CGFloat = .NaN {
    didSet {
      presenter?.presentionConfiguration?.blurOpacity = blurOpacity
    }
  }

  @IBInspectable public var shadowColor: UIColor? {
    didSet {
      presenter?.presentionConfiguration?.shadowColor = shadowColor
    }
  }

  @IBInspectable public var shadowRadius: CGFloat = CGFloat.NaN {
    didSet {
      presenter?.presentionConfiguration?.shadowRadius = shadowRadius
    }
  }

  @IBInspectable public var shadowOpacity: CGFloat = CGFloat.NaN {
    didSet {
      presenter?.presentionConfiguration?.shadowOpacity = shadowOpacity
    }
  }

  @IBInspectable public var shadowOffset: CGPoint = CGPoint(x: CGFloat.NaN, y: CGFloat.NaN) {
    didSet {
      presenter?.presentionConfiguration?.shadowOffset = shadowOffset

      modalTransitionStyle = dismissSystemTransition
    }
  }
}

private extension AnimatableModalViewController {
  func setupPresenter() {
    let animationType = PresentationAnimationType.fromString(presentationAnimationType ?? "") ?? PresentationAnimationType.Cover(fromDirection: .Bottom)
    presenter = PresentationPresenterManager.sharedManager().retrievePresenter(animationType, transitionDuration: transitionDuration)
