NavigationSplitViewDestination
@MainActor
public final class NavigationSplitViewDestination<PresentationConfigurationType, SplitViewType> : NavigationSplitViewDestinationable where PresentationConfigurationType : DestinationPresentationConfiguring, SplitViewType : NavigationSplitViewDestinationInterfacing, PresentationConfigurationType.DestinationType == SplitViewType.DestinationType
A Destination which represents a SwiftUI View
that contains a NavigationSplitView
.
This is a generic Destination that can be used to represent NavigationSplitView
implementations in a SwiftUI-based app.
To implement the NavigationSplitView
associated with this Destination and to enable dynamic updating of your NavigationSplitView
‘s column, bind these properties from inside each column’s closure using a BindableContainerView
.
Example:
NavigationSplitView(columnVisibility: $columnVisibility) {
BindableContainerView(content: $destinationState.destination.currentSidebar)
} content: {
BindableContainerView(content: $destinationState.destination.currentContent)
} detail: {
BindableContainerView(content: $destinationState.destination.currentDetail)
}
-
An enum which defines all routable Destinations in the app.
Declaration
Swift
public typealias DestinationType = SplitViewType.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 = SplitViewType.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 = SplitViewType.UserInteractionType
-
The type of
View
associated with this Destination.Declaration
Swift
public typealias ViewType = SplitViewType
-
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 destinationIDsForColumns: [NavigationSplitViewColumn : UUID] { get set }
-
Declaration
Swift
@MainActor public var currentSidebar: ContainerView<AnyView> { get set }
-
Declaration
Swift
@MainActor public var currentContent: ContainerView<AnyView> { get set }
-
Declaration
Swift
@MainActor public var currentDetail: ContainerView<AnyView> { 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<NavigationSplitViewDestination>] { 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 supportsIgnoringCurrentDestinationStatus: Bool { get set }
-
Undocumented
Declaration
Swift
@MainActor public var listID: UUID { get set }
-
Declaration
Swift
@MainActor public var isSystemNavigating: Bool { get set }
-
init(destinationType:
destinationsForColumns: destinationConfigurations: navigationConfigurations: parentDestinationID: ) The initializer.
Declaration
Swift
@MainActor public init(destinationType: DestinationType, destinationsForColumns: [NavigationSplitViewColumn : any ViewDestinationable<PresentationConfiguration>], destinationConfigurations: DestinationConfigurations? = nil, navigationConfigurations: NavigationConfigurations? = nil, parentDestinationID: UUID? = nil)
Parameters
destinationType
The type of Destination.
destinationsForColumns
A dictionary of
View
-based Destination objects, whose associated keys are theNavigationSplitViewColumn
column type should be displayed in.destinationConfigurations
The Destination presentation configurations associated with this Destination.
navigationConfigurations
The system navigation events associated with this Destination.
parentDestinationID
The identifier of the parent Destination.