I have a bug on SwiftUI, when I rotate my device the modal don't longer dismiss, the problem here is that only happen on the device on the simulator works well also on my iPad.
import SwiftUI
struct modalView: View {
@Environment(\.presentationMode) var presentationMode
var body: some View {
Button(action:{
self.presentationMode.wrappedValue.dismiss()
}){
Text("close")
}
}
}
struct ContentView: View {
@State var showModal = false
var body: some View {
Button(action: {
showModal.toggle()
}){
Text("modal")
}
.sheet(isPresented: self.$showModal, content: {
modalView()
})
}
}
[Bug on my device][1]
i have this problem since iOS 13 im currently on iOS 14.2 beta and Xcode 12 GM [1]: https://twitter.com/MisaelLandero/status/1306953785651142656?s=20