title: displaying a video, adding a UITextfield and saving it to the iphone's album
body: <p>I am trying to make a snapchat clone. Currently I am working on the camera's video recording portion. I take a video, make a url, and set an <code>MPMoviePlayerController</code> to play it. Add a <code>UITextField</code> to the MPMoviePlayerController.view and save the whole thing. The problem is, it is not the same as capturing a still image, shown here:</p>
  
  <pre><code>imageView.layer.addSublayer(captionField.layer)
  UIGraphicsBeginImageContext(self.view.bounds.size)
  imageView.layer.renderInContext(UIGraphicsGetCurrentContext())
  image = UIGraphicsGetImageFromCurrentImageContext()
  UIGraphicsEndImageContext()
  
  let library:ALAssetsLibrary = ALAssetsLibrary()
  var orientation: ALAssetOrientation = ALAssetOrientation(rawValue: image.imageOrientation.rawValue)!
  library.writeImageToSavedPhotosAlbum(image.CGImage, orientation: orientation, completionBlock: nil)
  </code></pre>
  
  <p>Currently I have this, which saves only the video but not the uitextfield with it:</p>
  
  <pre><code>moviePlayer = MPMoviePlayerController(contentURL: outputFileURL)
  
  player = moviePlayer!
  player.view.frame = self.view.bounds
  player.controlStyle = .None
  player.repeatMode = .One
  player.prepareToPlay()
  player.scalingMode = .AspectFill
  self.view.addSubview(player.view)
  player.view.layer.addSublayer(captionField.layer)
  UIGraphicsBeginImageContext(self.view.bounds.size)
  player.view.layer.renderInContext(UIGraphicsGetCurrentContext())
  UIGraphicsEndImageContext()
  
  ALAssetsLibrary().writeVideoAtPathToSavedPhotosAlbum(outputFileURL, completionBlock: {
      (assetURL:NSURL!, error:NSError!) in
      if error != nil{
          print(error)
      } else {
          self.resetButtons()
      }
  })
  </code></pre>
  
  <p>I assumed that there would be a video equivalent to the still image way of saving, but you don't save the <code>MPMoviePlayerController</code>, in my function it is called "player" or the player.view, but the URL of the player, which can be accessed with player.contentURL, (nice to know, though in this case, redundant), or outputFileURL. Has anyone achieved this functionality with any camera-based applications in the past? Does anyone know how this can be achieved?</p>