Allow a way to create a window without affecting the status bar appearance.

Originator:steipete
Number:rdar://23677818 Date Originated:27-Nov-2015 06:36 PM
Status:Open Resolved:
Product:iOS Product Version:9.1
Classification:UI/Usability Reproducible:Always
 
Summary:
Sometimes having a UIWindow is essential for apps. In PSPDFKit we use custom windows rarely, but e.g. the text loupe is build as a custom window. This is by far the most convenient way, and UIKit internally uses windows for this as well.

Problem: There’s no sane way to make the UIWindow not change the status bar. In the paste we did *insane* workarounds to try to infer the correct status bar appearance, but it’s a lot of code, error prone and just impossible to match all the little details that are in there. So we went with polling the status bar appearance (setting the window to hidden, poll the appearance, set it back to visible). This was required because our status HUD is also a window and it’s quite common that behind the HUD view controller appearance takes place, which is very hard to detect. But you might agree that polling is really, really, really horrible.

The solution that UIKit internally uses, and the solution that is correct and nice, is returning NO for _canAffectStatusBarAppearance. Unfortunately, this is private, so we have to so insane, buggy hacks to try to simulate it.

It would be great if there would be a simpler solution. Sample attached that shows the problem. (Imagine the red thing is a HUD or text loupe)

Comments

Sample: http://cl.ly/3N2L1s333s0g


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!