Configuration

public final class Configuration<ResultableType: Resultable>

Acts as storage for navigation parameters.

  • Embeds destination view controller.

    Declaration

    Swift

    @discardableResult public func embedded(in type: EmbeddingType) -> Self

    Parameters

    type

    Embedding type.

    Return Value

    Configuration instance.

  • Embeds destination view controller.

    Declaration

    Swift

    @discardableResult public func embedded(in embeddingProtocol: EmbeddingProtocol.Type) -> Self

    Parameters

    embeddingProtocol

    EmbeddingProtocol type.

    Return Value

    Configuration instance.

  • Embeds destination view controller.

    Declaration

    Swift

    @discardableResult public func embeddedInNavigationController() -> Self

    Return Value

    Configuration instance.

  • Animates navigation.

    Declaration

    Swift

    @discardableResult public func animated(_ animated: Bool) -> Self

    Parameters

    animated

    Boolean stating whether navigation is transitioned with animation.

    Return Value

    Configuration instance.

  • Observes navigation transitioning completion.

    Declaration

    Swift

    @discardableResult public func completion(_ completion: @escaping () -> Void) -> Self

    Parameters

    completion

    Completion block called after navigation transitioning.

    Return Value

    Configuration instance.

  • Sets UIViewControllerTransitioningDelegate to destination view controller.

    Declaration

    Swift

    @discardableResult public func transitioningDelegate(_ transitioningDelegate: UIViewControllerTransitioningDelegate) -> Self

    Parameters

    transitioningDelegate

    UIViewControllerTransitioningDelegate object.

    Return Value

    Configuration instance.

  • Adds navigation to queue.

    Declaration

    Swift

    @discardableResult public func safely() -> Self

    Return Value

    Configuration instance.

  • Tracks keyboard.

    Declaration

    Swift

    @discardableResult public func trackKeyboard(with keyboardTrackingMode: KeyboardTrackingMode) -> Self

    Parameters

    keyboardTrackingMode

    Keyboard tracking behaviour.

    Return Value

    Configuration instance.

  • Makes destination state restorable.

    Declaration

    Swift

    @discardableResult public func stateRestorable() -> Self

    Return Value

    Configuration instance.

  • Makes destination state restorable.

    Declaration

    Swift

    @discardableResult public func stateRestorable(identifier: String) -> Self

    Parameters

    identifier

    Restoration identifier.

    Return Value

    Configuration instance.

  • Makes destination state restorable.

    Declaration

    Swift

    @discardableResult public func stateRestorable(identifier: String, class: UIViewControllerRestoration.Type) -> Self

    Parameters

    identifier

    Restoration identifier.

    class

    Restoration class

    Return Value

    Configuration instance.

  • Prepares data for view controller.

    Declaration

    Swift

    @discardableResult public func passData(_ data: Any) -> Self

    Parameters

    data

    Data to pass.

    Return Value

    Configuration instance.

  • Prepares data for view controller.

    Declaration

    Swift

    @discardableResult public func withData(_ data: Any) -> Self

    Parameters

    data

    Data to pass.

    Return Value

    Configuration instance.

  • Prepares data for data receiving view controller.

    Declaration

    Swift

    @discardableResult public func passData(_ data: ResultableType.ToViewController.DataType) -> Configuration<Result<ResultableType.ToViewController, ResultableType.ToViewController.DataType>>

    Parameters

    data

    Data to pass.

    Return Value

    Configuration instance.

  • Prepares data for data receiving view controller.

    Declaration

    Swift

    @discardableResult public func passDataInBlock(_ dataBlock: @escaping (@escaping (ResultableType.ToViewController.DataType) -> Void) -> Void) -> Configuration<Result<ResultableType.ToViewController, ResultableType.ToViewController.DataType>>

    Parameters

    dataBlock

    Block to pass data.

    Return Value

    Configuration instance.

  • Prepares data for data receiving view controller.

    Declaration

    Swift

    @discardableResult public func withData(_ data: ResultableType.ToViewController.DataType) -> Configuration<Result<ResultableType.ToViewController, ResultableType.ToViewController.DataType>>

    Parameters

    data

    Data to pass.

    Return Value

    Configuration instance.

  • Prepares data for data receiving view controller.

    Declaration

    Swift

    @discardableResult public func withDataInBlock(_ dataBlock: @escaping (@escaping (ResultableType.ToViewController.DataType) -> Void) -> Void) -> Configuration<Result<ResultableType.ToViewController, ResultableType.ToViewController.DataType>>

    Parameters

    dataBlock

    Block to pass data.

    Return Value

    Configuration instance.

  • Sets window to navigate on.

    Declaration

    Swift

    @discardableResult public func inWindow(_ window: UIWindow) -> Self

    Parameters

    window

    Window object.

    Return Value

    Configuration instance.

  • Sets origin.

    Declaration

    Swift

    @discardableResult public func from<T: UIViewController>(_ viewController: T) -> Self

    Parameters

    viewController

    Origin view controller in navigation.

    Return Value

    Configuration instance.

  • Observe navigation success.

    Declaration

    Swift

    @discardableResult public func onSuccess(_ success: @escaping (ResultableType) -> Void) -> Self

    Parameters

    success

    Success block.

    Return Value

    Configuration instance.

  • Observe navigation failure.

    Declaration

    Swift

    @discardableResult public func onFailure(_ failure: @escaping (Error) -> Void) -> Self

    Parameters

    failure

    Failure block.

    Return Value

    Configuration instance.

  • Observe various events defined in NavigationEvent enum.

    Declaration

    Swift

    @discardableResult public func on(_ event: NavigationEvent<ResultableType.ToViewController, ResultableType.DataType>) -> Self

    Parameters

    event

    NavigationEvent enum case.

    Return Value

    Configuration instance.

  • Caches navigation.

    Declaration

    Swift

    @discardableResult public func keepAlive(within lifetime: Lifetime, cacheIdentifier: String) -> Self

    Parameters

    lifetime

    Lifetime object.

    cacheIdentifier

    Cache identifier string.

    Return Value

    Configuration instance.

  • Protects navigation by pausing it and gives an option to continue.

    Declaration

    Swift

    @discardableResult public func protect(with protectionSpace: ProtectionSpace) -> Self

    Parameters

    protectionSpace

    ProtectionSpace object.

    Return Value

    Configuration instance.