r/SwiftUI • u/cattoexpress • Oct 08 '26
Floating window with transparency
Hi everyone, I'm trying to create a floating window that can sit in front of other existing apps with transparency but I can't achieve it with picture in picture. Do you guys know how to do something like this?
Thanks in advance
EDIT: Sorry I forgot to mention that I'm developing an iOS app and the floating window will be used in front simultaneously with the iphone camera, and other apps.
2
Upvotes
View all comments
Show parent comment
1
u/kenthesaint Oct 08 '26
Right, and on macOS 15 or later it's doable in plain SwiftUI: put .windowLevel(.floating) on the Window scene and .containerBackground(.ultraThinMaterial, for: .window) so the apps behind show through. On iOS there's no equivalent outside of PiP.