Open gshaw opened 1 year ago
Work around is to perform the state change after sleeping for a short duration.
Button("Open Sheet") {
Task {
try? await Task.sleep(nanoseconds: 1_000_000) // 1ms
showSheet = true
}
}
Reported to Apple: https://feedbackassistant.apple.com/feedback/12082620
Environment: Xcode 14.2 Swift iOS 16.2 iPhone 12 mini. Must run on device, simulator works as expected.
Steps to reproduce
Expected
The menu to close and the sheet to open.
Actual
The menu closes as expected but the sheet does not open even though the state is changed by the button. If the menu is not open this does not happen.
SheetMenuBug.zip
https://user-images.githubusercontent.com/33321/228053724-4a0f86a8-637a-4002-bd34-b6e7884aa8e3.MP4