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 more

    Declaration

    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 id as the parentID value.

    See more

    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 more

    Declaration

    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 a UINavigationController or SwiftUI’s NavigationStack.
    • tabBar(tab: TabType) This presentation type will present a Destination in the specified tab of a tab bar component, such as a UITabBarController or SwiftUI’s TabView. If no destinationType is present in the DestinationPresentation 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 a UISplitViewController or SwiftUI’s NavigationSplitView.
    • addToCurrent This presentation type adds a Destination as a child of the currently-presented Destination. Note that this type only works with UIKit and utilizes UIViewController‘s addChild 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. The options parameter allows you to customize how the sheet is presented, configuring SwiftUI-specific options with a ViewSheetPresentationOptions model and UIKit-specific options with a ControllerSheetPresentationOptions 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. The presentation parameter allows you to use a CustomPresentation model with specialized closures to provide whatever functionality you need.
    See more

    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 shared reference.

    See more

    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 more

    Declaration

    Swift

    @MainActor
    public final class NavigationDestinationInterfaceState<Destination> : NavigationDestinationStateable where Destination : Destinationable
  • This class brings SwiftUI’s NavigationStack into the Destinations ecosystem, handling the state of the stack.

    See more

    Declaration

    Swift

    @MainActor
    public final class DestinationNavigator : DestinationPathNavigating
  • This class coordinates the presentation of a Destination within the SwiftUI framework.

    See more

    Declaration

    Swift

    @MainActor
    public final class DestinationSwiftUICoordinator : NSObject, DestinationSwiftUICoordinating
  • 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)
    }
    
    See more

    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 a NavigationStack.

    This is a generic Destination that can be used to represent most NavigationStack-based Views in a SwiftUI-based app.

    See more

    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 more

    Declaration

    Swift

    public final class SheetPresentation : SheetPresentationConfiguring
  • A Destination which represents a SwiftUI View which contains a TabView.

    This is a generic Destination that can be used to represent most TabViews in a SwiftUI-based app.

    See more

    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 Views in a SwiftUI-based app.

    See more

    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 more

    Declaration

    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 more

    Declaration

    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 UIViewController subclasses in a UIKit-based app.

    See more

    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 more

    Declaration

    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 more

    Declaration

    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 UINavigationController classes in a UIKit-based app.

    See more

    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 UISplitViewController subclass which can be used as an interface for a SplitViewControllerDestination.

    See more

    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 UISplitViewControllers in a UIKit-based app.

    See more

    Declaration

    Swift

    @MainActor
    public final class SplitViewControllerDestination<PresentationConfiguration, SplitViewControllerType> : SplitViewControllerDestinationable where PresentationConfiguration : DestinationPresentationConfiguring, SplitViewControllerType : SplitViewControllerDestinationInterfacing, PresentationConfiguration.DestinationType == SplitViewControllerType.DestinationType
  • Adapts a SwiftUI View for use inside a UIViewController, using a UIHostingController to present it within UIKit.

    See more

    Declaration

    Swift

    @MainActor
    public final class SwiftUIAdapter<Content> : SwiftUIAdaptable where Content : ViewDestinationInterfacing
  • A controller that serves as a container for a SwiftUI View.

    See more

    Declaration

    Swift

    @MainActor
    public final class SwiftUIContainerController<Content> : UIViewController, SwiftUIContainerInterfacing where Content : SwiftUIHostedInterfacing
  • A Destination representing a SwiftUIContainerController instance which presents a SwiftUI View within UIKit.

    See more

    Declaration

    Swift

    @MainActor
    public final class SwiftUIContainerDestination<Content, PresentationConfiguration> : ControllerDestinationable where Content : SwiftUIHostedInterfacing, PresentationConfiguration : DestinationPresentationConfiguring
  • A state object for a SwiftUI View being hosted within a UIKit interface.

    See more

    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 UITabViewControllers in a UIKit-based app.

    See more

    Declaration

    Swift

    @MainActor
    public final class TabBarControllerDestination<PresentationConfiguration, TabControllerType> : TabBarControllerDestinationable where PresentationConfiguration : DestinationPresentationConfiguring, TabControllerType : TabBarControllerDestinationInterfacing, PresentationConfiguration.DestinationType == TabControllerType.DestinationType, PresentationConfiguration.TabType == TabControllerType.TabType