While debugging a UIKit based app for visionOS we discovered this "magical" _MRUIPlatterOrnamentBackingWindow window that:
- Sets itself as the UIWindowScene.keyWindow
- Is not included in UIWindowScene.windows
- Has a windowLevel of 0 (normal) but is still in front of any other UIWindow in the scene.
Is there any way to make other UIWindows appear in front?
@anders.u Thank you for the feedback. I took a look at it, and in your case you're presenting a sheet, which appears in front of the presenting view controller (since visionOS is a 3D platform). So when presenting a new window, windowLevel
is not enough, you also need to specify a different z position if you want it to appear in front of the sheet. You can do that by setting window.layer.zPosition
. I added more detail in the feedback, which should make its way back to you soon.