title: Add overlay to cover entire screen(including status bar)
body: <p>I have an overlay <code>(UIImageView)</code> which should have a transparent background and alpha. How can I set the <code>imageview</code> such that it covers the entire screen? Currently, it covers the screen but not the <code>UIStatusBar</code>. I am adding the view in <code>AppDelegate's</code> main <code>window</code> as a <code>subview</code>. </p>
  
  <p>The code: </p>
  
  <pre><code>    let overlay1 = UIImageView(image: UIImage(named: "overlay-image"))
      overlay1.contentMode = .scaleAspectFit
      overlay1.backgroundColor = UIColor.black
      overlay1.alpha = 0.87
      overlay1.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)
  
      overlay1.isUserInteractionEnabled = true
      overlay1.layer.zPosition = 1
      (UIApplication.shared.delegate as? AppDelegate).window.addSubview(overlay1)
  </code></pre>