title: Can't add view infront of modal controller's view
body: <p>I have a modally presented view controller and I want to push a modal view on top of it. This should be simple to do, but I've missed something :)</p>
  
  <p>The modally presented view controller doesn't cover the whole screen (it uses custom presentation) so I can't just add my view on top of that. But when I try to add my view to either the presenting view controller, or just onto <code>UIApplication.shared.keyWindow.rootViewController.view</code> I get a very strange result.</p>
  
  <p>I've tried this using the default modal presentation an it still behaves in the same way, so I don't believe it's my custom presentation causing this.</p>
  
  <p>Here is the exploded view from Xcode - with the overlay at the correct position front and center.</p>
  
  <p><a href="https://i.stack.imgur.com/FOF9d.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FOF9d.png" alt="Exploded Xcode interface view"></a></p>
  
  <p>And here is the simulator at the time this interface was snapshotted.</p>
  
  <p><a href="https://i.stack.imgur.com/MseXU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MseXU.png" alt="Simulator showing total lack of alert view"></a></p>
  
  <p>Does anyone know why the alert view (which is clearly at the top of the stack looking in Xcode) doesn't appear?</p>
  
  <p>NB: I'm pretty confident that the exploded view in Xcode is correct because it matches up with the output from <code>po [[[[[UIApplication sharedApplication] keyWindow] rootViewController] view] recursiveDescription]</code></p>