title: What to use instead of UIScreen.mainScreen().applicationFrame for swift in ios 9.1?
body: <p>This might be a simple question but since I'm a beginner, it is best to ask. </p>
  
  <p>As the title says what should I use instead of  <code>UIScreen.mainScreen().applicationFrame</code> since it's deprecated in 9.0.</p>
  
  <p>If possible it would be great if you can provide me with a sample or example ,since I find Apples document difficult. </p>
  
  <p>Currently I use the code below but I wish to change it to the new version. I would love to hear from you!</p>
  
  <pre><code>  let sizeRect = UIScreen.mainScreen().applicationFrame
    let posX = arc4random_uniform(UInt32(sizeRect.size.width))
    let posY = arc4random_uniform(UInt32(sizeRect.size.height))
    Enemy.position = CGPoint(x: CGFloat(posX), y: CGFloat(posY))
  </code></pre>