NavigatingViewDestinationable
@MainActor
public protocol NavigatingViewDestinationable<DestinationType, ContentType, TabType> : GroupedViewDestinationable where Self.ViewType : NavigatingDestinationInterfacing
This protocol represents a type of Destination which manages a SwiftUI NavigationStack.
-
navigateBackInStack(previousPresentationID:Default implementation) Removes the current Destination and navigates to the previous Destination in the stack, if one exists.
Default Implementation
Declaration
Swift
@MainActor func navigateBackInStack(previousPresentationID: UUID?)Parameters
previousPresentationIDAn optional unique identifier of the previous Destination.
-
navigator()Default implementationReturns the navigator which manages the
NavigationStack.Default Implementation
Declaration
Swift
@MainActor func navigator() -> (any DestinationPathNavigating)? -
supportsIgnoringCurrentDestinationStatusExtension methodUndocumented
Declaration
Swift
@MainActor var supportsIgnoringCurrentDestinationStatus: Bool { get } -
Declaration
Swift
@MainActor func addChild(childDestination: any Destinationable<DestinationType, ContentType, TabType>, shouldSetDestinationAsCurrent: Bool? = true, shouldAnimate: Bool? = true) -
replaceChild(currentID:Extension methodwith: removeDestinationFromFlowClosure: ) Declaration
Swift
@MainActor func replaceChild(currentID: UUID, with newDestination: any Destinationable<DestinationType, ContentType, TabType>, removeDestinationFromFlowClosure: RemoveDestinationFromFlowClosure? = nil) -
removeAllChildren()Extension methodDeclaration
Swift
@MainActor func removeAllChildren() -
removeChild(identifier:Extension methodremoveDestinationFromFlowClosure: ) Declaration
Swift
@MainActor func removeChild(identifier: UUID, removeDestinationFromFlowClosure: RemoveDestinationFromFlowClosure?) -
prepareForPresentation()Extension methodDeclaration
Swift
@MainActor func prepareForPresentation()
View on GitHub