我想在使用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
?
由于