 
 extension LightboxTransition : UIViewControllerAnimatedTransitioning {
 
-  private func transitionDuration(transitionContext: UIViewControllerContextTransitioning) -> NSTimeInterval {
+  func transitionDuration(transitionContext: UIViewControllerContextTransitioning) -> NSTimeInterval {
     return Timing.Transition
   }
 
-  private func animateTransition(transitionContext: UIViewControllerContextTransitioning) {
+  func animateTransition(transitionContext: UIViewControllerContextTransitioning) {
     let containerView = transitionContext.containerView()
     let duration = transitionDuration(transitionContext)
 


// MARK: Transition delegate

extension TransitionManager : UIViewControllerTransitioningDelegate {

  private func animationControllerForPresentedController(presented: UIViewController,
    presentingController presenting: UIViewController,
    sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
      presentingViewController = true
      return self
  }

  private func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
    presentingViewController = false
    return self
  }


class LightboxTransition: NSObject {

  struct Timing {
    static let Transition: NSTimeInterval = 1
  }

  var presentingViewController = false

  func dismissLightbox(controller: UIViewController) {
    controller.view.transform = CGAffineTransformMakeScale(0, 0)
    controller.view.alpha = 0
  }

  func showLightbox(controller: UIViewController) {
    controller.view.transform = CGAffineTransformIdentity
    controller.view.alpha = 1
  }
