We're creating an immersive app that needs to have something that acts rather similar to a UIAlertView
, but we don't want it to look like a system dialog, we want to use our own graphics. I've got a big chunk of the work done, but there are a few snags I've hit:
How do I make the UIView show up above the status bar (so that I can darken in, like a
UIAlertView
does)? Is this possible? I've added it to the window, but it still shows up underneath the status bar.How do I show it partially transparent but have the text still fully opaque? I want it to be shown similar to a
UIAlertView
in that it should be translucent, but if I set alpha to .8, that also decreases the alpha of subviews. If I only decrease the alpha of the background image, then the buttons appear opaque. If I decrease the alpha of the background image and the buttons, then the buttons don't look like they are embedded in the background image. I would very much like to not have to create a different image for each arrangement of embedded buttons
Edit: I haven't yet found a solution to the status bar issue, but I've noticed that a standard UIAlertView shows up in its own UIWindow, and when I investigated that, I found the windowLevel property:
const UIWindowLevel UIWindowLevelNormal;
const UIWindowLevel UIWindowLevelAlert;
const UIWindowLevel UIWindowLevelStatusBar;
Using my own UIWindow with UIWindowLevelAlert
still didn't make it show up above the status bar. I didn't try UIWindowLevelStatusBar
.