title: swift show alert with custom cell
body: <p>I have a custom cell. It has an UIImageView and a button. When I click the button, my app will save my image to Photo Album and show an result alert.</p>
  
  <p>Here my code:</p>
  
  <pre><code>@IBAction func saveImage(sender: UIButton) {
          UIImageWriteToSavedPhotosAlbum(self.photo.image!, self, "saveImageToLibrary:didFinishSavingWithError:contextInfo:", nil)
      }
  
  func saveImageToLibrary(image: UIImage, didFinishSavingWithError error: NSError?, contextInfo:UnsafePointer&lt;Void&gt;) {
      let vc = ViewController()
      if error == nil {
          let ac = UIAlertController(title: "Saved!", message: "Image has been saved to your photos.", preferredStyle: .Alert)
          ac.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil))
          vc.presentViewController(ac, animated: true, completion: nil)
      } else {
          let ac = UIAlertController(title: "Save error", message: error?.localizedDescription, preferredStyle: .Alert)
          ac.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil))
          vc.presentViewController(ac, animated: true, completion: nil)
      }
  }
  </code></pre>
  
  <p>But when I click my Save button in tableview, it saves image successfully with an warming:</p>
  
  <pre><code>Warning: Attempt to present &lt;UIAlertController: 0x7fa452f74ee0&gt; on &lt;Test.ViewController: 0x7fa452f56f40&gt; whose view is not in the window hierarchy!
  </code></pre>
  
  <p>How can I call an alert from custom cell?</p>