Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Okay, having been told it's possible, I tried placing a view on top of the main view and setting its y coordinate to -20. Then I west to Info.plist and set <code>Status bar style</code> to <code>Transparent black style (alpha of 0.5)</code>. The view I placed was visible beneath the status bar.</p> <p><img src="https://i.stack.imgur.com/gwaUr.png" alt="enter image description here"></p> <p>This only happened at run time; in Interface Buider the simulated translucent status bar is gray but opaque.</p> <p><strong>Edit</strong>: If you want to move your view controller's main view into this space, it is possible during <code>viewWillAppear</code>. (If you try to move it during <code>viewDidLoad</code>, it gets moved back afterwards.)</p> <pre><code>- (void)viewWillAppear:(BOOL)animated; { [super viewWillAppear:animated]; // Move the main view upwards if it isn't already there. CGRect frame = [[self view] frame]; frame.size.height += frame.origin.y; frame.origin.y = 0; [[self view] setFrame:frame]; } </code></pre> <p>However, it gets moved back after rotation, and my attempts to respond to rotation ended up breaking the cell layout if I did this to a <code>UITableView</code>.</p> <p>Here is the Swift version. Seems to work. Good solution for taking those App Store screen shots (well in addition to making the info.plist changes.</p> <p>override func viewWillAppear(animated: Bool) {</p> <pre><code> super.viewWillAppear(animated) // Move the main view upwards if it isn't already there. var frame: CGRect = self.view.frame frame.size.height += frame.origin.y frame.origin.y = 0 self.view.frame = frame } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      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