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)
}
  • id

    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 }
  • 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

    destinationType

    The type of Destination.

    destinationsForColumns

    A dictionary of View-based Destination objects, whose associated keys are the NavigationSplitViewColumn 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.

  • Declaration

    Swift

    @MainActor
    public func prepareForPresentation()