UIWindow:s windowLevel in relation to _MRUIPlatterOrnamentBackingWindow

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?

Answered by Vision Pro Engineer in 791373022

@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.

This window shouldn't prevent you from displaying other windows so I'd recommend filing a bug in Feedback Assistant to investigate your specific issue, and post here the ID. Please add as many detail as possible in your bug including sample code and screenshots or recordings.

@Vision Pro Engineer

Thanks for your response. We filed a feedback FB13938325 with sample code and a video recording.

Accepted Answer

@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.

@Vision Pro Engineer

Thank you for your helpful response!

Setting the window.layer.zPosition does solve the layering issue.

Though it's a bit confusing that the backing window has zPosition = 0 :)

UIWindow:s windowLevel in relation to _MRUIPlatterOrnamentBackingWindow
 
 
Q