Post not yet marked as solved
Post marked as unsolved with 2 replies, 306 views
My WatchOS app uses two view controllers with a paged navigation from the first to the second. The first view contains a list. The second view presents a modal. When the modal is closed and I navigate back to the first view controller the list is not visible. The view controllers contains nothing but the body. What can I do to make the list always visible?First viewstruct ContentView: View {
var body: some View {
List {
Text("Hello World")
Text("Hello World again")
}
}
}Second viewstruct NextView: View {
@State private var showModal = false
var body: some View {
Button(action: {
self.showModal = true
}) {
Text("Button")
}.sheet(isPresented: $showModal) {
Text("Modal")
}
}
}