Michael Long
Sep 18, 2022

--

In your code you have `scenePhase == .inactive` and that's probably not what you want.

Send your app to the background, then swipe up to see the switcher and you'll probably see the content you thought was covered..

This is because ScenePhase can be active, inactive... or background.

So to hide the content whenever your app isn't active your comparison should probably be `scenePhase != .active`.

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

No responses yet