Вы можете создать навигационную ссылку и установить свойства, чтобы она отображалась как кнопка: Вот мой код:
var body: some View {
NavigationView {
//Button to navigate to another page
NavigationLink(destination: AlertView()) {
Text("GO TO ALERT")
.padding(15)
.frame(minWidth: 0, maxWidth: .infinity)
.background(Color.red)
.foregroundColor(Color.white)
.cornerRadius(4)
}
.padding([.leading, .trailing], 30)
.padding([.top], 21)
.frame(height: 50)
}
}
Вот как это выглядит:

Надеюсь, это поможет .. Удачи:)