SwiftUI @State and .sheet() ios13 vs ios14
问题 Hello I am running into a problem here and I do not have a consistent behavior between my .sheet() view when running on ios13 or ios14 I got a view like this : @State private var label: String = "" @State private var sheetDisplayed = false ///Some code var body: some View { VStack { Button(action: { self.label = "A label" self.isDisplayed = true }) { Text("test") } }.sheet(isPresented: $sheetDisplayed, onDismiss: { self.label = "" }) { Text(self.label) } } On ios 13 this work as expected btn