Check the behavior of Modal Views of SwiftUI
On macOS Big Sur Public Beta, this issue is resolved.
- OS: macOS Big Sur 11.0
- Xcode: Version 12.0 Beta
SwiftUI View has .onAppear(perform:)
and .onDisappear(perform:)
methods.
This project tests these methods on modal view (sheet and popover).
Probably, .onDisappear(perform:)
method will not work on macOS App.
- Select 'iOSTest' scheme or 'macOSTest' scheme in Xcode.
- Run the project.
- OS: macOS Catalina 10.15
- Xcode: Version 11.1 (11A1027)
On iOSTest(iOS App), Disappear sheet
or Disappear popover
messages were displayed on console when the modal view was disappeared.
But on macOSTest(macOS App), these messages were not displayed on console when The modal view was disappeared.