title: How do I take a full screen Screenshot in Swift?
body: <p>I've found <a href="https://stackoverflow.com/a/25445629">this code</a>:</p>
  
  <pre><code>func screenShotMethod() {
      //Create the UIImage
      UIGraphicsBeginImageContext(view.frame.size)
      view.layer.renderInContext(UIGraphicsGetCurrentContext())
      let image = UIGraphicsGetImageFromCurrentImageContext()
      UIGraphicsEndImageContext()
      //Save it to the camera roll
      UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil)
  }
  </code></pre>
  
  <p>What do I need to do to get all the other elements, like the navigation bar, into the screenshots?</p>