title: Saving an image on top of another image in Swift
body: <p>I am learning Swift and I am creating an app that uses a personal photo and puts another on top of it. I now have a hacky solution, to create a screenshot of the area and save it. I need to do this in Swift</p>
  
  <pre><code>@IBAction func saveImage(sender: AnyObject) {
      //Create the UIImage
      UIGraphicsBeginImageContext(imageView.frame.size)
      view.layer.renderInContext(UIGraphicsGetCurrentContext())
      let image = UIGraphicsGetImageFromCurrentImageContext()
      UIGraphicsEndImageContext()
      //Save it to the camera roll
      UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil)
  }
  </code></pre>
  
  <p>But, this was working and isn't anymore. But, this is also not the best solution. </p>
  
  <p>So guys, how can I save an image to the camera roll from a personal image, with an image as overlay?</p>
  
  <p>Help would be greatly appreciated!! Thanks!</p>