StepAssembler

@MainActor
public struct StepAssembler<VC, C> where VC : UIViewController

Builds a DestinationStep instance with the correct settings into a chain of steps.

NB

Both Finder and Factory instances should deal with the same type of UIViewController and Context instances.

Usage

let productScreen = StepAssembler<ProductViewController, ProductContext>()
        .finder(.classWithContextFinder)
        .factory(.storyboardFactory(name: "TabBar", identifier: "ProductViewController"))
        .adding(ContextSettingTask())
        .using(.push)
        .from(.navigationController)
        .using(.present)
        .from(.current)
        .assemble()

*Introduced by Savva Shuliatev *

Methods

  • Constructor

    Declaration

    Swift

    @MainActor
    public init()
  • Sets a specific Finder instance

    Declaration

    Swift

    @_disfavoredOverload
    @MainActor
    public func finder<F>(_ finder: F) -> StepAssemblerWithFinder<F> where VC == F.ViewController, C == F.Context, F : Finder

    Parameters

    finder

    The UIViewController Finder instance.

Shorthands

Available where VC: ContextChecking, C == VC.Context