Saving videos to photo library when taken from camera in IPhone

只愿长相守 提交于 2020-01-24 20:53:04

问题


I was wondering if there is a method similar to UIImageWriteToSavedPhotosAlbum(UIImage *image, id completionTarget, SEL completionSelector, void *contextInfo), that saves Videos taken from the iphone camera to the u sers Photo Albums... been trying to look for it in apple docs but havent found anything.

Thanks


回答1:


After digging around: The answer is there is no such feature in SDK 3.0, however it is coming in 3.1, the method is void UISaveVideoAtPathToSavedPhotosAlbum ( NSString *videoPath, id completionTarget, SEL completionSelector, void *contextInfo );, heres a link http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIKitFunctionReference/Reference/reference.html#//apple_ref/c/func/UISaveVideoAtPathToSavedPhotosAlbum




回答2:


I too was looking forward to the ability to save videos to the camera roll... but now that 3.1 is out, I still haven't found a way to do it.

Maybe what they were referring to was the ability to save videos received in emails and SMS messages to the camera roll (which ARE new features in the 3.1 OS). The only new class related to video that I've seen is the UIVideoEditorController (http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIVideoEditorController_ClassReference/Reference/Reference.html), and there are some new properties for UIImagePickerController that let you specify max video duration, and video quality... but I still haven't found anything that lets you save videos to the camera roll.

Has anyone else figured this out?



来源:https://stackoverflow.com/questions/1159516/saving-videos-to-photo-library-when-taken-from-camera-in-iphone

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!