DestinationPresentationType
@MainActor
public enum DestinationPresentationType<DestinationType, ContentType, TabType> : DestinationPresentationTypeable, Equatable where DestinationType : RoutableDestinations, ContentType : ContentTypeable, TabType : TabTypeable
An enum representing the supported presentation types in Destinations.
-
Represents a presentation action of a navigation stack such as a
UINavigationControlleror SwiftUI’sNavigationStack.Declaration
Swift
case navigationStack(type: NavigationPresentationType)Parameters
typeAn enum representing the type of navigation action to be taken.
-
Presents a Destination in the specified tab of a tab bar such as a
UITabBarControlleror SwiftUI’sTabView.If a
destinationTypeis specified along with this presentation type, the specified Destination will be presented in that tab, with the tab becoming active. However if nodestinationTypeis present in theDestinationPresentationmodel, the specified tab will simply be selected, becoming the active tab within the interface.Declaration
Swift
case tabBar(tab: TabType)Parameters
tabAn enum representing the tab that the Destination should be presented in.
-
Presents a Destination in a column of a split view interface, such as a
UISplitViewControlleror SwiftUI’sNavigationSplitView.Please choose the appropriate framework property for the interface you’re using (
UISplitViewControllerorNavigationSplitView). Not providing the expected property will result in an error when the presenting a Destination with this presentation type.Declaration
Swift
case splitView(column: SplitViewColumn)Parameters
columnA model representing a particular column in the split view interface.
-
Adds a Destination as a child of the currently presented Destination. Note that this type only works with UIKit and utilizes
UIViewController‘saddChildmethod.Declaration
Swift
case addToCurrent -
Replaces the currently presented Destination with a new Destination in system UI components which allow that.
Declaration
Swift
case replaceCurrent -
Removes all active Destinations in the Flow and sets a new root Destination.
Declaration
Swift
case replaceRoot -
Defines the presentation of a sheet view.
Declaration
Swift
case sheet(type: SheetPresentationType, options: SheetPresentationOptions? = nil)Parameters
typeAn enum representing the state of the sheet.
optionsA model that provides options for configuring how the sheet is presented.
-
Presents a path of multiple Destinations, useful for navigating to a nested interface view.
Note
The array order of the configuration objects is the order in which the Destinations will be presented.
Declaration
Swift
case destinationPath(path: [DestinationPresentation<DestinationType, ContentType, TabType>])Parameters
pathAn array of presentation configuration models representing the Destinations to be presented.
-
Defines a custom presentation of a Destination. This presentation type can be used to support the presentation of non-standard interfaces or system components which Destinations does not directly support.
Important
At the end of your custom presentation you must callcompletionClosure, passing a Boolean for whether the presentation or setup succeeds or fails.Declaration
Swift
case custom(presentation: CustomPresentation<DestinationType, ContentType, TabType>)Parameters
presentationAn object containing a closure which drives the custom presentation.
-
Declaration
Swift
nonisolated public var rawValue: String { get } -
Declaration
Swift
nonisolated public static func == (lhs: DestinationPresentationType<DestinationType, ContentType, TabType>, rhs: DestinationPresentationType<DestinationType, ContentType, TabType>) -> Bool
View on GitHub