Post not yet marked as solved
Post marked as unsolved with 1 replies, 3,462 views
Hello All,I'm trying to navigate to a new viewvia a SwiftUI Button, can it be done? or should i be using navigation views?HStack() {
Button(action: { }) {
Text("Staff")
}.frame(width: 150, height: 75).background(Color.purple).cornerRadius(10).shadow(radius: 5).foregroundColor(Color.white)
Button(action: {}) {
Text("Visitor")
}.frame(width: 150, height: 75).background(Color.purple).cornerRadius(10).shadow(radius: 5).foregroundColor(Color.white)
}i would like to have each button navigate to its own view, if possible. I'm new to SwiftUI but i have done this same thing using segues and identifiers o im sure there is a way to accomplish this.