Post

Replies

Boosts

Views

Activity

Switching Views in SwiftUI with a button.
How would I switch to a different view in SwiftUI with a press of a button? I've tried doing the method where pressing a button toggles a variable, but it just spits a bunch of errors. Also, would I need to make a new SwiftUI file, or could I incorporate the new view into the default ContentView.swift?
3
0
2.1k
Apr ’21