ViewDestinationable

@MainActor
public protocol ViewDestinationable<DestinationType, ContentType, TabType> : Destinationable

This protocol represents a Destination which is associated with a SwiftUI View.

  • The type of View associated with this Destination.

    Declaration

    Swift

    associatedtype ViewType : ViewDestinationInterfacing
  • Declaration

    Swift

    associatedtype DestinationType
  • The SwiftUI View associated with this Destination.

    Declaration

    Swift

    @MainActor
    var view: ViewType? { get set }
  • currentView() Default implementation

    Returns the View managed by this Destination.

    Default Implementation

    Declaration

    Swift

    @MainActor
    func currentView() -> ViewType?

    Return Value

    A ViewDestinationInterfacing object, if one exists.

  • presentSheet(sheet:) Default implementation

    Presents a sheet in the Destination’s view.

    Default Implementation

    Declaration

    Swift

    @MainActor
    func presentSheet(sheet: any Sheetable)

    Parameters

    sheet

    The sheet model to configure the sheet presentation.

  • dismissSheet() Default implementation

    Dismisses the currently presented sheet.

    Default Implementation

    Declaration

    Swift

    @MainActor
    func dismissSheet()
  • assignAssociatedView(view:) Default implementation

    Assigns a View to be associated with this Destination.

    Default Implementation

    Declaration

    Swift

    @MainActor
    func assignAssociatedView(view: ViewType)

    Parameters

    view

    The View that should be represented by this Destination.

  • setPresentingNavigator(navigator:) Default implementation

    Sets a reference to the navigator presenting this Destination.

    Default Implementation

    Declaration

    Swift

    @MainActor
    func setPresentingNavigator(navigator: any DestinationPathNavigating)

    Parameters

    navigator

    A navigator object.

  • moveBackInNavigationStack() Default implementation

    Requests that the navigator presenting this Destination move to the previous Destination in the navigation path.

    Default Implementation

    Declaration

    Swift

    @MainActor
    func moveBackInNavigationStack()
  • Declaration

    Swift

    @MainActor
    func assignInteractor<Request>(interactor: any AbstractInteractable<Request>, for type: InteractorType) where Request : InteractorRequestConfiguring
  • Declaration

    Swift

    @MainActor
    func updateInterfaceActions(actions: [InterfaceAction<UserInteractionType, DestinationType, ContentType>])
  • Declaration

    Swift

    @MainActor
    func updateSystemNavigationActions(actions: [InterfaceAction<SystemNavigationType, DestinationType, ContentType>])
  • performAction(for:content:) Extension method

    Declaration

    Swift

    @MainActor
    func performAction(for interactionType: UserInteractionType, content: ContentType? = nil) throws
  • Declaration

    Swift

    @available(*, deprecated, renamed: "performAction(for:content:﹚", message: "This method is deprecated and will be removed in a future version. Please migrate your code to use the `performAction(for:content:﹚` method instead.")
    @MainActor
    func performInterfaceAction(interactionType: UserInteractionType, content: ContentType? = nil) throws
  • removeAssociatedInterface() Extension method

    Declaration

    Swift

    @MainActor
    func removeAssociatedInterface()