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
Post a Comment