title: Swift Bug: Snapshotting a view that has not been rendered results in an empty snapshot
body: <p>I have read many postings on this website (especially this: <a href="https://stackoverflow.com/questions/25884801/ios-8-snapshotting-a-view-that-has-not-been-rendered-results-in-an-empty-snapsho">iOS 8 Snapshotting a view that has not been rendered results in an empty snapshot</a>) but there is no answer for Swift.</p>
  
  <p>Thought I would ask the crowd here if they have solved this problem or not.</p>
  
  <p>I am using Xcode 6.2, iOS 8.2 on an iPhone 6</p>
  
  <p>My code:</p>
  
  <pre><code>if UIImagePickerController.isSourceTypeAvailable(UIImagePickerControllerSourceType.Camera){
          if(UIImagePickerController .isSourceTypeAvailable(UIImagePickerControllerSourceType.Camera)){
              imag = UIImagePickerController()
              imag.delegate = self
              imag.sourceType = UIImagePickerControllerSourceType.Camera;
              imag.allowsEditing = false
              imag.mediaTypes = [kUTTypeImage]
              imag.showsCameraControls = false
              self.presentViewController(imag, animated: true, completion: nil)
              imag.cameraDevice = UIImagePickerControllerCameraDevice.Front
              imag.takePicture()
          }
      }
  </code></pre>
  
  <p>If I change this (self.presentViewController(imag, animated: true, completion: nil)) to  (self.presentViewController(imag, animated: YES, completion: nil)), I get and error to switch back to true.</p>