ViewDestinationable
@MainActor
public protocol ViewDestinationable<PresentationConfiguration> : Destinationable where Self.PresentationType == DestinationPresentationType<Self.PresentationConfiguration>
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
typealias PresentationType = DestinationPresentationType<PresentationConfiguration>
-
The SwiftUI
View
associated with this Destination.Declaration
Swift
@MainActor var view: ViewType? { get set }
-
currentView()
Default implementationReturns 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 implementationDismisses 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. -
setupInteractor(interactor:
Extension methodfor: ) Declaration
Swift
@MainActor func setupInteractor<Request, ResultData>(interactor: any Interactable<Request, ResultData>, for type: InteractorType) where Request : InteractorRequestConfiguring, ResultData : Hashable
-
updateInterfaceActions(actions:
Extension method) Declaration
Swift
@MainActor func updateInterfaceActions(actions: [InterfaceAction<UserInteractionType, DestinationType, ContentType>])
-
updateSystemNavigationActions(actions:
Extension method) Declaration
Swift
@MainActor func updateSystemNavigationActions(actions: [InterfaceAction<SystemNavigationType, DestinationType, ContentType>])
-
removeAssociatedInterface()
Extension methodDeclaration
Swift
@MainActor func removeAssociatedInterface()