开发者

copy video from iphone using the UIImagePickerController?

Hey, I know that when a user selects a Video I do ge开发者_如何转开发t a URL for the video.... but can you direct me to a proper implementation because my App just sticks there when I click choose in the simulator and I cannot navigate away from the Video Player page.... Any good tutorial on this?


Once you select the video - execution flows to the following function:

(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info

{

.... code here .....

//get the videoURL
NSString* videoURL= [info objectForKey:UIImagePickerControllerMediaURL];

//IMPORTANT: remember to test that the video is compatible for saving to the photos album

UISaveVideoAtPathToSavedPhotosAlbum(videoURL, self, @selector(video:didFinishSavingWithError:contextInfo:), nil);

.... code here .....

}

Take a look into 'UISaveVideoAtPathToSavedPhotosAlbum' specifically. This allows saving to the camera roll.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜