DestinationNavigator
@MainActor
public final class DestinationNavigator : DestinationPathNavigating
This class brings SwiftUI’s NavigationStack
into the Destinations ecosystem, handling the state of the stack.
-
An array of
UUID
identifiers representing Destinations in the associated navigation path.Declaration
Swift
@MainActor public var navigationPath: [UUID] { get set }
-
The identifier of the current destination presentation.
Declaration
Swift
@MainActor public var currentPresentationID: UUID? { get set }
-
The identifier of the Destination associated with this navigator.
Declaration
Swift
@MainActor public var navigatorDestinationID: UUID? { get set }
-
The initializer.
Declaration
Swift
@MainActor public init(navigationPath: [UUID]? = nil)
Parameters
navigationPath
An array of
UUID
identifiers representing Destinations in the associated navigation path. -
Declaration
Swift
@MainActor public func addPathElement(item: UUID, shouldAnimate: Bool? = true)