DestinationPresentationType

@MainActor
public enum DestinationPresentationType<PresentationConfiguration> : DestinationPresentationTypeable, Equatable where PresentationConfiguration : DestinationPresentationConfiguring

An enum representing the supported presentation types in Destinations.

  • An enum which defines types of tabs in a tab bar.

    Declaration

    Swift

    public typealias TabType = PresentationConfiguration.TabType
  • Represents a presentation action of a navigation stack such as a UINavigationController or SwiftUI’s NavigationStack.

    Declaration

    Swift

    case navigationController(type: NavigationPresentationType)

    Parameters

    type

    An enum representing the type of navigation action to be taken.

  • Presents a Destination in the specified tab of a tab bar such as a UITabBarController or SwiftUI’s TabView.

    If a destinationType is specified along with this presentation type, the specified Destination will be presented in that tab, with the tab becoming active. However if no destinationType is present in the DestinationPresentation model, the specified tab will simply be selected, becoming the active tab within the interface.

    Declaration

    Swift

    case tabBar(tab: TabType)

    Parameters

    tab

    An 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 UISplitViewController or SwiftUI’s NavigationSplitView.

    Please choose the appropriate framework property for the interface you’re using (UISplitViewController or NavigationSplitView). 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

    column

    A 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‘s addChild method.

    Declaration

    Swift

    case addToCurrent
  • Replaces the currently presented Destination with a new Destination in system UI components which allow that.

    Declaration

    Swift

    case replaceCurrent
  • Defines the presentation of a sheet view.

    Declaration

    Swift

    case sheet(type: SheetPresentationType, options: SheetPresentationOptions? = nil)

    Parameters

    type

    An enum representing the state of the sheet.

    options

    A 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: [PresentationConfiguration])

    Parameters

    path

    An 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 call completionClosure, passing a Boolean for whether the presentation or setup succeeds or fails.

    Declaration

    Swift

    case custom(presentation: CustomPresentation<PresentationConfiguration>)

    Parameters

    presentation

    An 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<PresentationConfiguration>, rhs: DestinationPresentationType<PresentationConfiguration>) -> Bool