Posts

Post not yet marked as solved
1 Replies
319 Views
In SwiftUI, it looks like when a window is not in view its scene phase is set to ScenePhase.background after a minute or so. Now when every window of an app has been closed, the last window to be closed has its phase set to SchenePhase.background. This makes it quite difficult to differentiate reopening and app from a window that was out of view being glanced at again. I have tried implementing a solution where I count opened/closed window with an onChange that watches scenePhase, but it unfortunately looks like not every window closing gets detected (specifically if there are two windows, with one window is in the background, and the one active window is closed, its scene phase onChange is never triggered). Is there a better way to handle the case of differentiating between reopening an app with looking back at a suspended window that was never actually closed?
Posted
by ncitron.
Last updated
.
Post not yet marked as solved
2 Replies
832 Views
How can we make the background of our main view transparent so that we can have additional views inside the main view appear to float? I have tried setting the background color to Color.clear as well as using glassBackgroundEffect(displayMode: .never) but neither seem to work.
Posted
by ncitron.
Last updated
.