ControllerFlow
@MainActor
public final class ControllerFlow<DestinationType, TabType, ContentType> : NSObject, ControllerFlowable, UITabBarControllerDelegate where DestinationType : RoutableDestinations, TabType : TabTypeable, ContentType : ContentTypeable
extension ControllerFlow: DestinationInterfaceCoordinatorDelegate
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.
-
An enum which defines all routable Destinations in the app.
Declaration
Swift
public typealias DestinationType = DestinationType -
An enum which defines types of tabs in a tab bar.
Declaration
Swift
public typealias TabType = TabType -
An enum which defines the types of content that are able to be sent through Destinations.
Declaration
Swift
public typealias ContentType = ContentType -
Declaration
Swift
public typealias InterfaceCoordinator = DestinationUIKitCoordinator -
Declaration
Swift
@MainActor public var activeDestinations: [any Destinationable<DestinationType, ContentType, TabType>] -
Declaration
Swift
@MainActor public var currentDestination: (any Destinationable<DestinationType, ContentType, TabType>)? -
Declaration
Swift
@MainActor public var destinationProviders: [DestinationType : any ControllerDestinationProviding] -
Declaration
Swift
@MainActor public var uiCoordinator: DestinationUIKitCoordinator? -
Declaration
Swift
@MainActor public var rootDestination: (any Destinationable<DestinationType, ContentType, TabType>)? -
Declaration
Swift
@MainActor public var destinationQueue: [DestinationPresentation<DestinationType, ContentType, TabType>] -
Declaration
Swift
@MainActor public var isPresentingDestinationPath: Bool -
The starting Destination in the Flow.
Declaration
Swift
@MainActor public var startingDestination: DestinationPresentation<DestinationType, ContentType, TabType>? -
The initializer.
Declaration
Swift
@MainActor public init(destinationProviders: [DestinationType : any ControllerDestinationProviding], startingDestination: DestinationPresentation<DestinationType, ContentType, TabType>, routesToIgnore: [DestinationType]? = nil)Parameters
destinationProvidersA dictionary of Destination providers whose keys are an enum of Destination types. The Destination type represents the type of Destination each provider can provide.
startingDestinationThe starting Destination.
routesToIgnoreAn optional list of routes to ignore when checking for Provider assignments.
-
Declaration
Swift
@MainActor public func start() -
Declaration
Swift
@MainActor public func assignBaseController(_ baseController: any ControllerDestinationInterfacing) -
Declaration
Swift
@MainActor public func destination(for configuration: DestinationPresentation<DestinationType, ContentType, TabType>) -> (any ControllerDestinationable<DestinationType, ContentType, TabType>)? -
Declaration
Swift
@discardableResult @MainActor public func presentDestination(configuration: DestinationPresentation<DestinationType, ContentType, TabType>) -> (any ControllerDestinationable<DestinationType, ContentType, TabType>)? -
Declaration
Swift
@MainActor public func presentationCompletionClosure(for configuration: DestinationPresentation<DestinationType, ContentType, TabType>, destination: (any Destinationable<DestinationType, ContentType, TabType>)? = nil) -> PresentationCompletionClosure?
-
UITabBarControllerDelegate delegate method
Declaration
Swift
@MainActor public func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) -
Declaration
Swift
@MainActor public func didRequestCurrentDestinationChange(newDestinationID: UUID)
View on GitHub