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.
-
Declaration
Swift
public typealias DestinationType = DestinationType
-
Declaration
Swift
public typealias TabType = TabType
-
Declaration
Swift
public typealias ContentType = ContentType
-
Declaration
Swift
public typealias PresentationConfiguration = DestinationPresentation<DestinationType, ContentType, TabType>
-
Declaration
Swift
public typealias InterfaceCoordinator = DestinationUIKitCoordinator
-
Declaration
Swift
@MainActor public var activeDestinations: [any Destinationable<DestinationPresentation<DestinationType, ContentType, TabType>>]
-
Declaration
Swift
@MainActor public var currentDestination: (any Destinationable<DestinationPresentation<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<DestinationPresentation<DestinationType, ContentType, TabType>>)?
-
Declaration
Swift
@MainActor public var destinationQueue: [DestinationPresentation<DestinationType, ContentType, TabType>]
-
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>)
Parameters
destinationProviders
A dictionary of Destination providers whose keys are an enum of Destination types. The Destination type represents the type of Destination each provider can provide.
startingDestination
The starting Destination.
-
Declaration
Swift
@MainActor public func start()
-
Declaration
Swift
@MainActor public func assignRoot(rootController: any ControllerDestinationInterfacing)
-
Declaration
Swift
@MainActor public func destination(for configuration: DestinationPresentation<DestinationType, ContentType, TabType>) -> (any ControllerDestinationable<DestinationPresentation<DestinationType, ContentType, TabType>>)?
-
Declaration
Swift
@discardableResult @MainActor public func presentDestination(configuration: DestinationPresentation<DestinationType, ContentType, TabType>) -> (any ControllerDestinationable<DestinationPresentation<DestinationType, ContentType, TabType>>)?
-
Declaration
Swift
@MainActor public func presentationCompletionClosure(for configuration: DestinationPresentation<DestinationType, ContentType, TabType>, destination: (any Destinationable<DestinationPresentation<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)