I have serious problem. My Xcode version is 13, iOS version is 15.
import SwiftUI
struct ContentView: View {
@State var isGo: Bool = false
var body: some View {
ZStack {
Button(action: {
self.isGo = true
}, label: {
Text("Go EmptyView")
})
EmptyView()
.background(Color.green)
.frame(width: 100, height: 100)
.sheet(isPresented: $isGo, onDismiss: nil, content: {
PopupView()
})
}
}
}
struct PopupView: View {
var body: some View {
Rectangle()
.fill(Color.green)
}
}
Above code is not working. But, Previous Xcode version or Previous iOS version is that code is working. Is that iOS bug? Is there anything solution?