ios - Why can I not make my new UIWindow appear over top of the status bar? -


i'm trying place uiwindow above status bar temporarily alert purposes.

the code quite simple:

    let newwindow = uiwindow(frame: uiscreen.mainscreen().bounds)     newwindow.hidden = false     newwindow.backgroundcolor = uicolor.greencolor()     newwindow.windowlevel = uiwindowlevelstatusbar + 1.0     newwindow.makekeyandvisible()     newwindow.hidden = false 

however when put in viewdidappear of root view controller, never see window.

what doing wrong?

you must retain newwindow somehow, try use strong property. rest of code seems ok except fact call 2 times hidden


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -