NavigationSplitViewDestination
@MainActor
public final class NavigationSplitViewDestination<ViewType, UserInteractionType, DestinationType, ContentType, TabType, InteractorType> : NavigationSplitViewDestinationable where ViewType : NavigationSplitViewDestinationInterfacing, UserInteractionType : UserInteractionTypeable, DestinationType : RoutableDestinations, ContentType : ContentTypeable, TabType : TabTypeable, InteractorType : InteractorTypeable
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)
}
-
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 internalState: DestinationInternalState<UserInteractionType, DestinationType, ContentType, TabType, InteractorType> { get set } -
Declaration
Swift
@MainActor public var groupInternalState: GroupDestinationInternalState<DestinationType, ContentType, TabType> { 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 } -
Undocumented
Declaration
Swift
@MainActor public var listID: UUID { get set } -
init(destinationType:destinationsForColumns: destinationConfigurations: navigationConfigurations: parentDestinationID: ) The initializer.
Declaration
Swift
@MainActor public init(destinationType: DestinationType, destinationsForColumns: [NavigationSplitViewColumn : any ViewDestinationable<DestinationType, ContentType, TabType>], destinationConfigurations: DestinationConfigurations? = nil, navigationConfigurations: NavigationConfigurations? = nil, parentDestinationID: UUID? = nil)Parameters
destinationTypeThe type of Destination.
destinationsForColumnsA dictionary of
View-based Destination objects, whose associated keys are theNavigationSplitViewColumncolumn type should be displayed in.destinationConfigurationsThe Destination presentation configurations associated with this Destination.
navigationConfigurationsThe system navigation events associated with this Destination.
parentDestinationIDThe identifier of the parent Destination.
-
Declaration
Swift
@MainActor public func prepareForPresentation()
View on GitHub