BaseTransition

open class BaseTransition

Base class for transition objects.

  • Should the transition be animated.

    Declaration

    Swift

    open var isAnimated: Bool
  • Object responsible for finding currently visible view in view hierarchy.

    Declaration

    Swift

    public let viewFinder: ViewFinder?
  • Creates animated transition object. If finder argument is nil, Route class uses ViewFinder passed by the Router that performs the route. This is recommended behavior unless you want to customize view searching for this particular transition.

    Declaration

    Swift

    public init(finder: ViewFinder? = nil, isAnimated: Bool = true)

    Parameters

    finder

    Object responsible for finding currently visible view in view hierarchy. Defaults to nil.

    isAnimated

    Should the transition be animated. Defaults to true.

  • If isAnimated flag is true, calls visibleView.transitionCoordinator animate(alongsideTransition:) method and calls completion block once transition has been completed. If isAnimated is false, just calls completion block and returns.

    Declaration

    Swift

    open func animateAlongsideTransition(with visibleView: ViewController?, isAnimated: Bool, completion: ((Bool) -> Void)?)

    Parameters

    visibleView

    View to perform transition on

    isAnimated

    whether transition should be animated

    completion

    completion block to call once transition is completed