title: Screenshot showing up blank - Swift
body: <p>Hi I am making a game and I have added a share button to the game. I want the user to be able to share a message, URL, and screenshot along side each other in one message.The sharing aspect of it is working fine and everything is showing up except that the screenshot itself is showing up blank. This is the code I am using to take a screenshot: </p>
  
  <pre><code>   let layer = UIApplication.sharedApplication().keyWindow!.layer
      let scale = UIScreen.mainScreen().scale
      UIGraphicsBeginImageContextWithOptions(layer.frame.size, false, scale);
  
      layer.renderInContext(UIGraphicsGetCurrentContext())
      let screenshot = UIGraphicsGetImageFromCurrentImageContext()
      UIGraphicsEndImageContext()
  
      UIImageWriteToSavedPhotosAlbum(screenshot, nil, nil, nil)
  
      println("screenshot")
  </code></pre>
  
  <p>Please help me resolve this issue and please be sure to do so in the Swift language. Also I am using SpriteKit Technology if that makes a difference. I am new to coding so please be very clear. Thank you very much!</p>