在UIImagePickerControllerUserDidCaptureItem之后保存视频

时间:2015-09-26 18:01:48

标签: swift uiimagepickercontroller nsurl

我想在使用UIImagePickerController捕获视频后立即保存视频,所以我正在使用:

NSNotificationCenter.defaultCenter().addObserverForName("_UIImagePickerControllerUserDidCaptureItem", object:nil, queue:nil, usingBlock: { note in

            self.saveMovie()

        })

要保存我通常使用委托方法

func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {

        let videoPath = info[UIImagePickerControllerMediaURL] as! NSURL

        let stringVideoPath = videoPath.path

        UISaveVideoAtPathToSavedPhotosAlbum(stringVideoPath!, self, nil, nil)

        picker.dismissViewControllerAnimated(true, completion: nil)
        picker.view.superview?.removeFromSuperview()

    }

但我想绕过这个。如何让videoPath无法访问上面的info并自行使用UISaveVideoAtPathToSavedPhotosAlbum

由于

0 个答案:

没有答案