使用UIImagePickerController从iphone复制视频?

时间:2010-06-18 05:27:38

标签: iphone uiimagepickercontroller

嘿,我知道当用户选择视频时,我会获得视频的网址....但是你可以指引我正确实施,因为当我点击模拟器中的选择时,我的应用程序就在那里无法离开视频播放器页面.... 对此有任何好的教程吗?

1 个答案:

答案 0 :(得分:3)

选择视频后 - 执行流程到以下功能:

(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 .....

}

具体看看' UISaveVideoAtPathToSavedPhotosAlbum '。这样可以保存到相机胶卷。