         beginCallback?(state == .animating)
         beginCallback = nil
       }
+      delegate?.heroTransition(self, didUpdate: state)
     }
   }
 


        transitionContext?.updateInteractiveTransition(CGFloat(progress))
      }
    }
  }
  lazy var progressRunner: HeroProgressRunner = {

  public static var shared = HeroTransition()
}

protocol HeroTransitionDelegate: class {
  func heroTransition(_ hero: HeroTransition, didUpdate state: HeroTransitionState)
  func heroTransition(_ hero: HeroTransition, didUpdate progress: Double)
}

open class HeroTransition: NSObject {
  weak var delegate: HeroTransitionDelegate?

  public var defaultAnimation: HeroDefaultAnimationType = .auto
  public var containerColor: UIColor = .black
