NavigationViewDestination
@MainActor
public final class NavigationViewDestination<UserInteractionType, ViewDestinationType, PresentationConfigurationType, InteractorType> : NavigatingViewDestinationable where UserInteractionType : UserInteractionTypeable, ViewDestinationType : NavigatingDestinationInterfacing, PresentationConfigurationType : DestinationPresentationConfiguring, InteractorType : InteractorTypeable
A Destination class whose associated user interface is a View
which contains a NavigationStack
.
This is a generic Destination that can be used to represent most NavigationStack
-based View
s in a SwiftUI-based app.
-
An enum which defines all routable Destinations in the app.
Declaration
Swift
public typealias DestinationType = PresentationConfigurationType.DestinationType
-
An enum which defines types of tabs in a tab bar.
Declaration
Swift
public typealias TabType = PresentationConfigurationType.TabType
-
An enum which defines the types of content that are able to be sent through Destinations.
Declaration
Swift
public typealias ContentType = PresentationConfigurationType.ContentType
-
An enum which defines types of Interactors. Each Destination may have its own Interactor types.
Declaration
Swift
public typealias InteractorType = InteractorType
-
A model type which configures Destination presentations. Typically this is a
DestinationPresentation
.Declaration
Swift
public typealias PresentationConfiguration = PresentationConfigurationType
-
An enum which defines user interaction types for this Destination’s interface.
Declaration
Swift
public typealias UserInteractionType = UserInteractionType
-
The type of
View
associated with this Destination.Declaration
Swift
public typealias ViewType = ViewDestinationType
-
Declaration
Swift
@MainActor public let id: UUID
-
Declaration
Swift
@MainActor public let type: DestinationType
-
Declaration
Swift
@MainActor public var view: ViewType? { get set }
-
Declaration
Swift
@MainActor public var childDestinations: [any Destinationable<PresentationConfiguration>] { get set }
-
Declaration
Swift
@MainActor public var currentChildDestination: (any Destinationable<PresentationConfiguration>)? { get set }
-
Declaration
Swift
@MainActor public var parentDestinationID: UUID? { get set }
-
Declaration
Swift
@MainActor public var destinationConfigurations: DestinationConfigurations? { get set }
-
Declaration
Swift
@MainActor public var systemNavigationConfigurations: NavigationConfigurations? { get set }
-
Declaration
Swift
@MainActor public var interactors: [InteractorType : any Interactable] { get set }
-
Declaration
Swift
@MainActor public var interfaceActions: [UserInteractionType : InterfaceAction<UserInteractionType, DestinationType, ContentType>] { get set }
-
Declaration
Swift
@MainActor public var systemNavigationActions: [SystemNavigationType : InterfaceAction<SystemNavigationType, DestinationType, ContentType>] { get set }
-
Declaration
Swift
@MainActor public var interactorAssistants: [UserInteractionType : any InteractorAssisting<NavigationViewDestination>] { get set }
-
Declaration
Swift
@MainActor public var childWasRemovedClosure: GroupChildRemovedClosure? { get set }
-
Declaration
Swift
@MainActor public var currentDestinationChangedClosure: GroupCurrentDestinationChangedClosure? { get set }
-
Declaration
Swift
@MainActor public var isSystemNavigating: Bool { get set }
-
The initializer.
Declaration
Swift
@MainActor public init(destinationType: DestinationType, destinationConfigurations: DestinationConfigurations? = nil, navigationConfigurations: NavigationConfigurations? = nil, parentDestination: UUID? = nil)
Parameters
destinationType
The type of Destination.
destinationConfigurations
The Destination presentation configurations associated with this Destination.
navigationConfigurations
The system navigation events associated with this Destination.
parentDestination
The identifier of the parent Destination.