title: UIImagePickerController video recording starts after delay or not working
body: <p>I am working on a application which needs custome camera UI. SO I used Overlay view in ImagePickerController. User can switch between capture modes. 
  (<code>UIImagePickerControllerCameraCaptureMode.Video</code> and <code>UIImagePickerControllerCameraCaptureMode.Photo</code> )</p>
  
  <p>My problem is when user swich capture mode from <code>.Photo</code> to <code>.Video</code> <code>startVideoCapture()</code>  function is taking time (up to 5 seconds) to initialize the video capturing at firs or second time.</p>
  
  <p>Sometimes it does not save video on specified path.<code>.Photo</code> mode is working fine.
  At starting I initialized imagePickerController with .Photo mode. And user could switch .Photo to .Video. I thought may be initializing .Video mode would have taken time. For this I initialize the imagePickerController with .Video mode and set a timer to change .video to .Photo mode in 4 seconds. While these 4 seconds user cannot see camera as I have added Loading screen to stop user interaction. </p>
  
  <p>But still problem persist. <code>startVideoCapture()</code> taking time to start recording for very first time. And sometimes it does not save video on specified path after recording.</p>
  
  <p>Here is my code to save video in delegate method.</p>
  
  <pre><code>/**
  *  Delegate method for media capture and save media
  */
  func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info:[NSObject : AnyObject]) {
  
      overlayView.bringSubviewToFront(preView)
  
      let mediaType = info[UIImagePickerControllerMediaType] as! NSString
  
      if mediaType.isEqualToString(kUTTypeMovie as NSString as String){
          let tempMedia = info[UIImagePickerControllerMediaURL] as! NSURL!
          let pathString = tempMedia.relativePath
  
          if pathString != nil {
  
              destinationPathForVideo = "\(UtilityManager.sharedInstance.kcache)/challengeRecordings/\(NSDate()).mp4"
  
              NSFileManager.defaultManager().createDirectoryAtPath(destinationPathForVideo.stringByDeletingLastPathComponent, withIntermediateDirectories: true, attributes: nil, error: nil)
  
              UtilityManager.sharedInstance.copyFileFromSourceTo( pathString, destinationPath: destinationPathForVideo )
  
              // Save Image
  
  
              imageCaptured = getThumbnailForVideoPath(pathString!)
              destinationPathForImage = "\(UtilityManager.sharedInstance.kcache)/challengeRecordings/\(NSDate()).png"
              let success = UIImagePNGRepresentation(imageCaptured).writeToFile( destinationPathForImage , atomically: true)
  
              Log(message:"Saved: \(success)")
  
              imageButton!.setImage(imageCaptured, forState: .Normal)
              imageView.image = imageCaptured
  
         }
  
  
  
  }
  </code></pre>
  
  <p>This is my initializing code </p>
  
  <pre><code>    imagePicker            = UIImagePickerController()
      imagePicker.delegate   = self
      imagePicker.sourceType = .Camera
      imagePicker.showsCameraControls = false
      self.imagePicker.mediaTypes = [kUTTypeMovie, kUTTypeImage]
      self.imagePicker.videoMaximumDuration = 11
      self.imagePicker.videoQuality = UIImagePickerControllerQualityType.TypeMedium
      self.imagePicker.cameraFlashMode = .Off
      self.imagePicker.cameraCaptureMode = UIImagePickerControllerCameraCaptureMode.Video
  </code></pre>
  
  <p>Somebody please help.</p>