Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to create custom UIAlertView
    primarykey
    data
    text
    <p>We're creating an immersive app that needs to have something that acts rather similar to a <code>UIAlertView</code>, 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:</p> <ol> <li><p>How do I make the UIView show up above the status bar (so that I can darken in, like a <code>UIAlertView</code> does)? Is this possible? I've added it to the window, but it still shows up underneath the status bar.</p></li> <li><p>How do I show it partially transparent but have the text still fully opaque? I want it to be shown similar to a <code>UIAlertView</code> 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</p></li> </ol> <p><strong>Edit:</strong> 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:</p> <pre><code>const UIWindowLevel UIWindowLevelNormal; const UIWindowLevel UIWindowLevelAlert; const UIWindowLevel UIWindowLevelStatusBar; </code></pre> <p>Using my own UIWindow with <code>UIWindowLevelAlert</code> still didn't make it show up above the status bar. I didn't try <code>UIWindowLevelStatusBar</code>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload