I can't click on a NavigationLink
in a List
after the Xcode update to Beta 3. The row is gray for some reason.
Here's the code:
List {
Section {
NavigationLink(destination: Text("ProfileView")) {
Text("Profil")
}
NavigationLink(destination: Text("Einstellungen")) {
Text("Einstellungen und Datenschutz")
}
}
}
List should be inside NavigationView,
Update your code as mentioned below,
NavigationView {
List {
Section {
NavigationLink(destination: Text("ProfileView")) {
Text("Profil")
}
NavigationLink(destination: Text("Einstellungen")) {
Text("Einstellungen und Datenschutz")
}
}
}
}
确保您的NavigationLink
在NavigationView
内部
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.