NavigationView
public struct NavigationView : View
A view that provides navigation functionalities.
Important
This is a Public Preview API. It may be changed or removed at any time.Represents different types of actions that can take place in the navigation stack view.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum Action
Represents actions taken upon arrival.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum ArrivalAction
The content and behavior of the view.
Declaration
Swift
public var body: some View { get }
Represents actions taken for confirmation.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum ConfirmationAction
Represents actions taken when an error occurs.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum ErrorAction
Initializes a new instance of NavigationView
.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Parameters
model
|
The view model containing the state and data for the navigation view. |
action
|
A closure that handles navigation actions. |
Represents actions taken based on an instruction.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum InstructionAction
Sets a closure to be called when the size changes.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public func onChangedSize(_ action: @escaping (CGSize) -> ()) -> NavigationView
Parameters
action
|
A closure that is called with the new |
Return Value
A modified instance of NavigationView
with the size change closure set.
ViewModel for the NavigationView. This class is responsible for handling the navigation logic and providing data to the view. It observes the navigation progress, destination arrival, and waypoint arrival.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public final class ViewModel : ObservableObject