TabViewDestination
@MainActor
public final class TabViewDestination<PresentationConfiguration, TabViewType> : TabBarViewDestinationable where PresentationConfiguration : DestinationPresentationConfiguring, TabViewType : TabBarViewDestinationInterfacing, PresentationConfiguration.DestinationType == TabViewType.DestinationType, PresentationConfiguration.TabType == TabViewType.TabType
extension TabViewDestination: @preconcurrency CustomStringConvertible
A Destination which represents a SwiftUI View
which contains a TabView
.
This is a generic Destination that can be used to represent most TabView
s in a SwiftUI-based app.
-
A type of AppDestinationConfigurations which handles Destination presentation configurations.
Declaration
Swift
public typealias DestinationConfigurations = AppDestinationConfigurations<UserInteractionType, PresentationConfiguration>
-
A type of AppDestinationConfigurations which handles system navigation events.
Declaration
Swift
public typealias NavigationConfigurations = AppDestinationConfigurations<SystemNavigationType, PresentationConfiguration>
-
An enum which defines all routable Destinations in the app.
Declaration
Swift
public typealias DestinationType = TabViewType.DestinationType
-
An enum which defines types of tabs in a tab bar.
Declaration
Swift
public typealias TabType = TabViewType.TabType
-
An enum which defines the types of content that are able to be sent through Destinations.
Declaration
Swift
public typealias ContentType = PresentationConfiguration.ContentType
-
An enum which defines types of Interactors. Each Destination may have its own Interactor types.
Declaration
Swift
public typealias InteractorType = TabViewType.InteractorType
-
A model type which configures Destination presentations. Typically this is a
DestinationPresentation
.Declaration
Swift
public typealias PresentationConfiguration = PresentationConfiguration
-
An enum which defines user interaction types for this Destination’s interface.
Declaration
Swift
public typealias UserInteractionType = TabViewType.UserInteractionType
-
The type of
View
associated with this Destination.Declaration
Swift
public typealias ViewType = TabViewType
-
Declaration
Swift
@MainActor public let id: UUID
-
Declaration
Swift
@MainActor public var type: DestinationType { get set }
-
Declaration
Swift
@MainActor public var view: ViewType? { get set }
-
Declaration
Swift
@MainActor public var parentDestinationID: UUID? { 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 destinationIDsForTabs: [TabType : 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<TabViewDestination>] { get set }
-
Declaration
Swift
@MainActor public var destinationPresentationClosure: TabBarViewDestinationPresentationClosure<PresentationConfiguration>? { get set }
-
Declaration
Swift
@MainActor public var selectedTabUpdatedClosure: TabBarViewSelectedTabUpdatedClosure<TabType>? { get set }
-
Declaration
Swift
@MainActor public var childWasRemovedClosure: GroupChildRemovedClosure? { get set }
-
Declaration
Swift
@MainActor public var currentDestinationChangedClosure: GroupCurrentDestinationChangedClosure? { get set }
-
Declaration
Swift
@MainActor public let supportsIgnoringCurrentDestinationStatus: Bool
-
Declaration
Swift
@MainActor public var isSystemNavigating: Bool { get set }
-
init(type:
tabDestinations: tabTypes: selectedTab: destinationConfigurations: navigationConfigurations: parentDestinationID: ) The initializer.
Declaration
Swift
@MainActor public init?(type: DestinationType, tabDestinations: [any ViewDestinationable<PresentationConfiguration>], tabTypes: [TabType], selectedTab: TabType, destinationConfigurations: DestinationConfigurations? = nil, navigationConfigurations: NavigationConfigurations? = nil, parentDestinationID: UUID? = nil)
Parameters
type
The type of Destination.
tabDestinations
An array of Destinations for each tab, in order of appearance.
tabTypes
An array of tab types, in order of appearance.
selectedTab
The type of tab that should be initially selected.
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 var description: String { get }