I'm a beginner in Swift - so let me begin with a beginner question. Right now I'm learning how to create views in SwiftUI and I wanted to navigate between them. According to some YouTube-Tutorials something like that should work:
struct ContentView: View {
var body: some View {
NavigationView {
NavigationButton(destination: Text("Ups.. es geht")) {
Text("Navi-Test")
}
}
}
}
Actually it doesn't work, I get the error "Use of unresolved identifier 'NavigationButton'" - why?...
In the tutorials I've seen it seems to work.
And - how to navigate from one View to another without clicking a button? Just by code?
SwiftUI is not part of Swift. It is a private Apple framework. You are encouraged to post a question on Apple-specific forums such as the Apple Developer forums, StackOverflow, other web resources. It is discouraged to ask about private Apple systems on this forum which is dedicated to the Swift language itself, regardless of platform.