View

public extension View

A set of view methods to handle coordination requests for views by mapping each coordinator presentation type to its appropriate view modifier handler if available

Coordination Request Handler

  • Call this function to handle coordination requests for views by mapping each coordinator presentation type to its appropriate view modifier handler if available.

    Declaration

    Swift

    func coordinated<VM>(by coordinator: MwxCoordinator<VM>?) -> some View where VM : AnyViewModel

    Parameters

    coordinator

    A MwxCoordinator indicates the coordinator for this view.

    Return Value

    The modified view for this coordination request.

  • Call this function to handle coordination requests for tab views by mapping each coordinator presentation type to its appropriate view modifier handler if available.

    Declaration

    Swift

    func coordinated<VM>(by coordinator: MwxCoordinator<VM>?, tabs: [AnyCoordinator]) -> some View where VM : AnyViewModel

    Parameters

    coordinator

    A MwxCoordinator indicates the coordinator for this view.

    tabs

    A AnyCoordinator array indicates the tab coordinators for this tab view.

    Return Value

    The modified tab view for this coordination request.

Coordinators Mapper

  • Call this function to apply a link modifier to a view or another view modifier coordinated by a link coordinator producing a navigation link for this view.

    Declaration

    Swift

    func linkModifier<VM>(_ coordinator: MwxCoordinator<VM>) -> AnyView where VM : AnyViewModel

    Parameters

    coordinator

    A MwxCoordinator indicates the coordinator for this view.

    Return Value

    The modified view for this coordination request.

  • Call this function to apply a sheet modifier to a view or another view modifier coordinated by a sheet coordinator producing a sheet view for this view.

    Declaration

    Swift

    func sheetModifier<VM>(_ coordinator: MwxCoordinator<VM>) -> AnyView where VM : AnyViewModel

    Parameters

    coordinator

    A MwxCoordinator indicates the coordinator for this view.

    Return Value

    The modified view for this coordination request.

  • Call this function to apply a sheet modifier to a view or another view modifier coordinated by a tab coordinator producing a tab view with tab items for an input title and image.

    Declaration

    Swift

    func tabModifier<VM>(_ coordinator: MwxCoordinator<VM>, tabs: [AnyCoordinator]) -> AnyView where VM : AnyViewModel

    Parameters

    coordinator

    A MwxCoordinator indicates the coordinator for this view.

    tabs

    A AnyCoordinator array indicates the tab coordinators for this tab view.

    Return Value

    The modified view for this coordination request.

  • Call this function to apply a no modifier to a view or another view producing a type-erased view for this view.

    Declaration

    Swift

    func noModifier() -> AnyView

    Return Value

    The type-erased view for this coordination request.