Complete the code to create a NavigationLink with a text label.
NavigationLink(destination: Text("Detail View")) { Text([1]) }
The label inside NavigationLink is a Text view showing "Go to Detail".
Complete the code to navigate to a custom view called DetailView.
NavigationLink(destination: [1]) { Text("Show Detail") }
The destination must be a view instance, so use DetailView() to navigate to that view.
Fix the error in the NavigationLink label to correctly display text.
NavigationLink(destination: DetailView()) {
[1]("Go")
}The label inside NavigationLink should be a Text view to display the string "Go".
Fill both blanks to create a NavigationLink with a label and destination view.
NavigationLink(destination: [1]) { [2]("Next Screen") }
The destination is DetailView() and the label is a Text view showing "Next Screen".
Fill all three blanks to create a NavigationLink with a destination and a label showing an image and text.
NavigationLink(destination: [1]) { HStack { Image(systemName: [2]) Text([3]) } }
The destination is SettingsView(), the image uses systemName "gearshape", and the label text is "Settings".