I have made a navigation bar in "Contentview" linked with each their tabitem to a swift.view file/page.
One of the pages they are linking to are a "dashboard/homepage".
I'm trying to add a button in the "dashboard.swiftview"file to another page/swiftview file called "Oppgaver". I get the button on the page, but its not clickable. What should I do?
This is the code:
import SwiftUI
struct Dashboard: View {
@State var datestring = ""
var body: some View {
NavigationLink (destination: Gj_reoppgave(), label: {
Text("Gå til gjøreoppgaver")
.foregroundColor(.white)
.font(.headline)
.frame(height:55)
.frame(maxWidth: .infinity)
.background(.blue)
.cornerRadius(10)
.multilineTextAlignment(.center)
.padding(30)
})
}
}
struct Dashboard_Previews: PreviewProvider {
static var previews: some View {
Dashboard()
}
}
}
4
0
648