Classes
The following classes are available globally.
-
A container class for Destination presentation configuration models, which are used by a Destination to present new Destinations.
See moreDeclaration
Swift
public final class AppDestinationConfigurations<UserInteractionType, PresentationConfiguration> : DestinationConfigurationsContaining where UserInteractionType : UserInteractionTypeable, PresentationConfiguration : DestinationPresentationConfiguring
-
A default assistant to be used to configure interface actions. This only adds the the current Destination’s
See moreid
as theparentID
value.Declaration
Swift
@MainActor public final class DefaultActionAssistant<UserInteractionType, DestinationType, ContentType> : InterfaceActionConfiguring where UserInteractionType : UserInteractionTypeable, DestinationType : RoutableDestinations, ContentType : ContentTypeable
-
Manages state for a Destination’s interface and holds a reference to it.
See moreDeclaration
Swift
@MainActor public final class DestinationInterfaceState<Destination> : DestinationStateable where Destination : Destinationable
-
This is a model used to configure how a Destination is presented or removed. It contains information such as the type of Destination to present, the type of presentation to be made, and the type of content to pass along. They are typically associated with a particular
InterfaceAction
and used to trigger a new presentation when a user interaction is made with the current UI.Destinations has several built-in presentation types which
DestinationPresentation
supports to enable native SwiftUI and UIKit UI navigation, as well as more complex or custom behavior.navigationController(type: NavigationPresentationType)
This presentation type will add and present a Destination in a navigation stack such as aUINavigationController
or SwiftUI’sNavigationStack
.tabBar(tab: TabType)
This presentation type will present a Destination in the specified tab of a tab bar component, such as aUITabBarController
or SwiftUI’sTabView
. If nodestinationType
is present in theDestinationPresentation
model, the specified tab will simply be selected, becoming the active tab within the interface.splitView(column: SplitViewColumn)
This presentation type will present a Destination in a column of a split view interface, such as aUISplitViewController
or SwiftUI’sNavigationSplitView
.addToCurrent
This presentation type adds a Destination as a child of the currently-presented Destination. Note that this type only works with UIKit and utilizesUIViewController
‘saddChild
method.replaceCurrent
This presentation type replaces the currently-presented Destination with a new Destination in system UI components which allow that.sheet(type: SheetPresentationType, options: SheetPresentationOptions?)
This presentation type presents (or dismisses) a Destination in a sheet. Theoptions
parameter allows you to customize how the sheet is presented, configuring SwiftUI-specific options with aViewSheetPresentationOptions
model and UIKit-specific options with aControllerSheetPresentationOptions
model.destinationPath(path: [DestinationPresentation])
This presentation type presents a path of multiple Destination objects, useful for providing deep linking functionality or building complex state with one user interaction.custom(presentation: CustomPresentation<DestinationPresentation>)
This presentation type enables you to present a custom presentation of a Destination. It can be used to support the presentation of custom UI, as well as system components which Destinations does not directly support. Thepresentation
parameter allows you to use aCustomPresentation
model with specialized closures to provide whatever functionality you need.
Declaration
Swift
@MainActor public final class DestinationPresentation<DestinationType, ContentType, TabType> : DestinationPresentationConfiguring where DestinationType : RoutableDestinations, ContentType : ContentTypeable, TabType : TabTypeable
extension DestinationPresentation: Hashable, Equatable
-
A singleton object which contains global options and an internal logger for Destinations. If you wish to interact with this class, please use the
See moreshared
reference.Declaration
Swift
@MainActor public final class DestinationsSupport
-
Manages state for a Destination’s interface, holding a reference to its associated Destination and a navigator object which manages the state of the interface’s navigation stack.
See moreDeclaration
Swift
@MainActor public final class NavigationDestinationInterfaceState<Destination> : NavigationDestinationStateable where Destination : Destinationable
-
This class brings SwiftUI’s
See moreNavigationStack
into the Destinations ecosystem, handling the state of the stack.Declaration
Swift
@MainActor public final class DestinationNavigator : DestinationPathNavigating
-
This class coordinates the presentation of a Destination within the SwiftUI framework.
See moreDeclaration
Swift
@MainActor public final class DestinationSwiftUICoordinator : NSObject, DestinationSwiftUICoordinating
-
A Destination which represents a SwiftUI
View
that contains aNavigationSplitView
.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 yourNavigationSplitView
‘s column, bind these properties from inside each column’s closure using aBindableContainerView
.Example:
See moreNavigationSplitView(columnVisibility: $columnVisibility) { BindableContainerView(content: $destinationState.destination.currentSidebar) } content: { BindableContainerView(content: $destinationState.destination.currentContent) } detail: { BindableContainerView(content: $destinationState.destination.currentDetail) }
Declaration
Swift
@MainActor public final class NavigationSplitViewDestination<PresentationConfigurationType, SplitViewType> : NavigationSplitViewDestinationable where PresentationConfigurationType : DestinationPresentationConfiguring, SplitViewType : NavigationSplitViewDestinationInterfacing, PresentationConfigurationType.DestinationType == SplitViewType.DestinationType
-
A Destination class whose associated user interface is a
View
which contains aNavigationStack
.This is a generic Destination that can be used to represent most
See moreNavigationStack
-basedView
s in a SwiftUI-based app.Declaration
Swift
@MainActor public final class NavigationViewDestination<UserInteractionType, ViewDestinationType, PresentationConfigurationType, InteractorType> : NavigatingViewDestinationable where UserInteractionType : UserInteractionTypeable, ViewDestinationType : NavigatingDestinationInterfacing, PresentationConfigurationType : DestinationPresentationConfiguring, InteractorType : InteractorTypeable
-
Configures the presentation of a SwiftUI sheet.
See moreDeclaration
Swift
public final class SheetPresentation : SheetPresentationConfiguring
-
A Destination which represents a SwiftUI
View
which contains aTabView
.This is a generic Destination that can be used to represent most
See moreTabView
s in a SwiftUI-based app.Declaration
Swift
@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 class whose associated user interface is a SwiftUI
View
.This is a generic Destination that can be used to represent most
See moreView
s in a SwiftUI-based app.Declaration
Swift
@MainActor public final class ViewDestination<UserInteractionType, ViewDestinationType, PresentationConfiguration> : ViewDestinationable where UserInteractionType : UserInteractionTypeable, ViewDestinationType : ViewDestinationInterfacing, PresentationConfiguration : DestinationPresentationConfiguring
extension ViewDestination: Equatable
extension ViewDestination: @preconcurrency CustomStringConvertible
-
A concrete Flow class designed to be used to manage Destinations flows within the SwiftUI framework. In most cases creating a custom Flow object is unnecessary, and this class can be used as-is in your SwiftUI-based app.
See moreDeclaration
Swift
@MainActor public final class ViewFlow<DestinationType, TabType, ContentType> : ViewFlowable where DestinationType : RoutableDestinations, TabType : TabTypeable, ContentType : ContentTypeable
extension ViewFlow: DestinationInterfaceCoordinatorDelegate
-
A model that’s used internally to represent tab types in Destinations.
See moreDeclaration
Swift
public final class TabModel<TabType> : Identifiable, Equatable, Hashable where TabType : TabTypeable
extension TabModel: CustomDebugStringConvertible
-
A Destination class whose associated user interface is a
UIViewController
.This is a generic Destination that can be used to represent most
See moreUIViewController
subclasses in a UIKit-based app.Declaration
Swift
@MainActor public final class ControllerDestination<UserInteractionType, ControllerDestinationType, PresentationConfigurationType, InteractorType> : ControllerDestinationable where UserInteractionType : UserInteractionTypeable, ControllerDestinationType : ControllerDestinationInterfacing, PresentationConfigurationType : DestinationPresentationConfiguring, InteractorType : InteractorTypeable
extension ControllerDestination: Equatable
extension ControllerDestination: @preconcurrency CustomStringConvertible
-
A concrete Flow class designed to be used to manage Destinations flows within the UIKit framework. In most cases creating a custom Flow object is unnecessary, and this class can be used as-is in your UIKit-based app.
See moreDeclaration
Swift
@MainActor public final class ControllerFlow<DestinationType, TabType, ContentType> : NSObject, ControllerFlowable, UITabBarControllerDelegate where DestinationType : RoutableDestinations, TabType : TabTypeable, ContentType : ContentTypeable
extension ControllerFlow: DestinationInterfaceCoordinatorDelegate
-
This class coordinates the presentation of a Destination within the UIKit framework.
See moreDeclaration
Swift
@MainActor public final class DestinationUIKitCoordinator : NSObject, DestinationUIKitCoordinating
-
A Destination class whose associated user interface is a
UINavigationController
.This is a generic Destination that can be used to represent most
See moreUINavigationController
classes in a UIKit-based app.Declaration
Swift
@MainActor public final class NavigationControllerDestination<UserInteractionType, ControllerDestinationType, PresentationConfigurationType, InteractorType> : NavigatingControllerDestinationable where UserInteractionType : UserInteractionTypeable, ControllerDestinationType : NavigationControllerDestinationInterfacing, PresentationConfigurationType : DestinationPresentationConfiguring, InteractorType : InteractorTypeable
extension NavigationControllerDestination: Equatable
extension NavigationControllerDestination: @preconcurrency CustomStringConvertible
-
A
See moreUISplitViewController
subclass which can be used as an interface for aSplitViewControllerDestination
.Declaration
Swift
@MainActor public final class SplitViewController<UserInteractionType, PresentationConfigurationType, InteractorType> : UISplitViewController, SplitViewControllerDestinationInterfacing where UserInteractionType : UserInteractionTypeable, PresentationConfigurationType : DestinationPresentationConfiguring, InteractorType : InteractorTypeable
-
A Destination which represents a UIKit
UISplitViewController
.This is a generic Destination that can be used to represent most
See moreUISplitViewController
s in a UIKit-based app.Declaration
Swift
@MainActor public final class SplitViewControllerDestination<PresentationConfiguration, SplitViewControllerType> : SplitViewControllerDestinationable where PresentationConfiguration : DestinationPresentationConfiguring, SplitViewControllerType : SplitViewControllerDestinationInterfacing, PresentationConfiguration.DestinationType == SplitViewControllerType.DestinationType
-
Adapts a SwiftUI
See moreView
for use inside aUIViewController
, using aUIHostingController
to present it within UIKit.Declaration
Swift
@MainActor public final class SwiftUIAdapter<Content> : SwiftUIAdaptable where Content : ViewDestinationInterfacing
-
A controller that serves as a container for a SwiftUI
See moreView
.Declaration
Swift
@MainActor public final class SwiftUIContainerController<Content> : UIViewController, SwiftUIContainerInterfacing where Content : SwiftUIHostedInterfacing
-
A Destination representing a
See moreSwiftUIContainerController
instance which presents a SwiftUIView
within UIKit.Declaration
Swift
@MainActor public final class SwiftUIContainerDestination<Content, PresentationConfiguration> : ControllerDestinationable where Content : SwiftUIHostedInterfacing, PresentationConfiguration : DestinationPresentationConfiguring
-
A state object for a SwiftUI
See moreView
being hosted within a UIKit interface.Declaration
Swift
@MainActor public final class SwiftUIHostingState<Content, PresentationConfiguration> : DestinationStateable where Content : SwiftUIHostedInterfacing, PresentationConfiguration : DestinationPresentationConfiguring
-
A Destination which represents a UIKit
UITabViewController
.This is a generic Destination that can be used to represent most
See moreUITabViewController
s in a UIKit-based app.Declaration
Swift
@MainActor public final class TabBarControllerDestination<PresentationConfiguration, TabControllerType> : TabBarControllerDestinationable where PresentationConfiguration : DestinationPresentationConfiguring, TabControllerType : TabBarControllerDestinationInterfacing, PresentationConfiguration.DestinationType == TabControllerType.DestinationType, PresentationConfiguration.TabType == TabControllerType.TabType