ReplaceNavigationTransition

open class ReplaceNavigationTransition : BaseTransition, ViewTransition

Class, that encapsulates UINavigationController.setViewControllers(_:animated:) method call as a transition.

  • Declaration

    Swift

    public enum Behavior
  • Transition type .show

    Declaration

    Swift

    public let transitionType: TransitionType
  • Behavior of replace navigation transition to perform

    Declaration

    Swift

    public let behavior: Behavior
  • Creates ReplaceNavigationTransition with specified behavior.

    Declaration

    Swift

    public init(_ behavior: Behavior = .replaceLast, finder: ViewFinder? = nil, isAnimated: Bool = true)

    Parameters

    behavior

    Behavior of replace navigation transition

    finder

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

    isAnimated

    Should the transition be animated. Defaults to true.

  • Performs transition by calling setViewControllers(_:animated:) on visible navigation controller

    Declaration

    Swift

    open func perform(with view: ViewController?, on visibleView: ViewController?, completion: ((Bool) -> Void)?)

    Parameters

    view

    currently visible view

    visibleView

    currently visible view in view hierarchy

    completion

    called once transition has been completed