Component - NavigationLink
The NavigationLink is a SwiftUI component that creates a tappable item to move from one screen to another in an app. It works like a door that takes you to a new page when you tap it.
The NavigationLink is a SwiftUI component that creates a tappable item to move from one screen to another in an app. It works like a door that takes you to a new page when you tap it.
NavigationView
└── List
├── NavigationLink (Item 1)
└── NavigationLink (Item 2)NavigationLink in SwiftUI?NavigationLink is used to create tappable items that navigate to another view.NavigationLink(destination: View) { LabelView }.NavigationView {
NavigationLink(destination: ProfileView()) {
Text("Go to Profile")
}
}NavigationLink(destination: Text("Details"))
Text("Tap here")Pass the test and this pattern moves unknown