DestinationInterfacing
@MainActor
public protocol DestinationInterfacing<DestinationType, ContentType, TabType>
A protocol representing a user interface object that is handled by Destinations. This is typically a View
in SwiftUI or a UIViewController
in UIKit.
-
An enum which defines all routable Destinations in the app.
Declaration
Swift
associatedtype DestinationType where Self.DestinationType == Self.Destination.DestinationType
-
An enum which defines the types of content that are available to this Destination interface.
Declaration
Swift
associatedtype ContentType where Self.ContentType == Self.Destination.ContentType
-
An enum which defines types of tabs in a tab bar.
Declaration
Swift
associatedtype TabType where Self.TabType == Self.Destination.TabType
-
An enum which defines types of Interactors. Each Destination may have its own Interactor types.
Declaration
Swift
associatedtype InteractorType : InteractorTypeable
-
An enum which defines user interaction types for this Destination’s interface.
Declaration
Swift
associatedtype UserInteractionType : UserInteractionTypeable
-
The type of Destination associated with this user interface.
Declaration
Swift
associatedtype Destination where Self.Destination == Self.DestinationState.Destination
-
The state model associated with this interface’s Destination.
Declaration
Swift
associatedtype DestinationState : DestinationStateable
-
The Destination associated with this UI element.
Declaration
Swift
@MainActor var destinationState: DestinationState { get set }
-
destination()
Default implementationReturns the current Destination associated with this interface element.
Default Implementation
Declaration
Swift
@MainActor func destination() -> Destination
Return Value
The associated Destination.
-
cleanupResources()
Default implementationWhen this method is called, this interface’s Destination is about to be removed from the Flow. Any resource references should be removed and in-progress tasks should be stopped.
Default Implementation
Declaration
Swift
@MainActor func cleanupResources()