HeroTransition
open class HeroTransition : NSObject
extension HeroTransition: UINavigationControllerDelegate
extension HeroTransition: UITabBarControllerDelegate
extension HeroTransition: UIViewControllerTransitioningDelegate
extension HeroTransition: UIViewControllerAnimatedTransitioning
extension HeroTransition: UIViewControllerInteractiveTransitioning
Undocumented
-
Undocumented
Declaration
Swift
public weak var delegate: HeroTransitionDelegate?
-
Undocumented
Declaration
Swift
public var defaultAnimation: HeroDefaultAnimationType
-
Undocumented
Declaration
Swift
public var containerColor: UIColor
-
Undocumented
Declaration
Swift
public var isUserInteractionEnabled: Bool
-
Undocumented
Declaration
Swift
public var viewOrderingStrategy: HeroViewOrderingStrategy
-
Undocumented
Declaration
Swift
public var defaultAnimationDirectionStrategy: HeroDefaultAnimationType.Strategy
-
Undocumented
Declaration
Swift
public internal(set) var state: HeroTransitionState { get set }
-
Undocumented
Declaration
Swift
public var isTransitioning: Bool { get }
-
Undocumented
Declaration
Swift
public internal(set) var isPresenting: Bool { get }
-
Undocumented
Declaration
Swift
public var transitioning: Bool { get }
-
Undocumented
Declaration
Swift
public var presenting: Bool { get }
-
container we created to hold all animating views, will be a subview of the transitionContainer when transitioning
Declaration
Swift
public internal(set) var container: UIView! { get }
-
destination view controller
Declaration
Swift
public internal(set) var toViewController: UIViewController? { get }
-
source view controller
Declaration
Swift
public internal(set) var fromViewController: UIViewController? { get }
-
context object holding transition informations
Declaration
Swift
public internal(set) var context: HeroContext! { get }
-
whether or not we are handling transition interactively
Declaration
Swift
public var interactive: Bool { get }
-
max duration needed by the animators
Declaration
Swift
public internal(set) var totalDuration: TimeInterval { get }
-
progress of the current transition. 0 if no transition is happening
Declaration
Swift
public internal(set) var progress: Double { get set }
-
Undocumented
Declaration
Swift
public override init()
-
Receive callbacks on each animation frame. Observers will be cleaned when transition completes
- observer: the observer
Declaration
Swift
public func observeForProgressUpdate(observer: HeroProgressUpdateObserver)
-
Undocumented
Declaration
Swift
open func animate()
-
Undocumented
Declaration
Swift
open func complete(finished: Bool)
-
Undocumented
Declaration
Swift
func transition(from: UIViewController, to: UIViewController, in view: UIView, completion: ((Bool) -> Void)? = nil)
-
Update the progress for the interactive transition.
- progress: the current progress, must be between 0…1
Declaration
Swift
public func update(_ percentageComplete: CGFloat)
-
Finish the interactive transition. Will stop the interactive transition and animate from the current state to the end state
Declaration
Swift
public func finish(animate: Bool = true)
-
Cancel the interactive transition. Will stop the interactive transition and animate from the current state to the beginning state
Declaration
Swift
public func cancel(animate: Bool = true)
-
Override modifiers during an interactive animation.
For example:
Hero.shared.apply([.position(x:50, y:50)], to:view)
will set the view’s position to 50, 50
- modifiers: the modifiers to override
- view: the view to override to
Declaration
Swift
public func apply(modifiers: [HeroModifier], to view: UIView)
-
Override target state during an interactive animation.
For example:
Hero.shared.changeTarget([.position(x:50, y:50)], to:view)
will animate the view’s position to 50, 50 once
finish(animate:)
is called- modifiers: the modifiers to override
- isDestination: if false, it changes the starting state
- view: the view to override to
Declaration
Swift
public func changeTarget(modifiers: [HeroModifier], isDestination: Bool = true, to view: UIView)
-
Undocumented
Declaration
Swift
open func start()
-
Undocumented
Declaration
Swift
public func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool)
-
Undocumented
Declaration
Swift
public func navigationController(_ navigationController: UINavigationController, didShow viewController: UIViewController, animated: Bool)
-
Undocumented
Declaration
Swift
public func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationController.Operation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning?
-
Undocumented
Declaration
Swift
public func navigationController(_ navigationController: UINavigationController, interactionControllerFor animationController: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning?
-
Undocumented
Declaration
Swift
public func tabBarController(_ tabBarController: UITabBarController, shouldSelect viewController: UIViewController) -> Bool
-
Undocumented
Declaration
Swift
public func tabBarController(_ tabBarController: UITabBarController, interactionControllerFor animationController: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning?
-
Undocumented
Declaration
Swift
public func tabBarController(_ tabBarController: UITabBarController, animationControllerForTransitionFrom fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning?
-
Undocumented
Declaration
Swift
public func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning?
-
Undocumented
Declaration
Swift
public func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning?
-
Undocumented
Declaration
Swift
public func interactionControllerForDismissal(using animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning?
-
Undocumented
Declaration
Swift
public func interactionControllerForPresentation(using animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning?
-
Undocumented
Declaration
Swift
public func animateTransition(using context: UIViewControllerContextTransitioning)
-
Undocumented
Declaration
Swift
public func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval
-
Undocumented
Declaration
Swift
public func animationEnded(_ transitionCompleted: Bool)
-
Undocumented
Declaration
Swift
public var wantsInteractiveStart: Bool { get }
-
Undocumented
Declaration
Swift
public func startInteractiveTransition(_ transitionContext: UIViewControllerContextTransitioning)