我可以从我的应用程序启动相机胶卷。我想在用户选择视频时获取视频的 URL,因为我想将它用于 Assets 读取/写入。
是否可以从相机胶卷中获取所选视频的 URL?如果是,怎么办?
谢谢。
最佳答案
将 UIImagePickerControllerDelegate 设置为您的类并使用此代码检索 url。
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
[self dismissModalViewControllerAnimated:YES];
NSURL *assetURL = [info objectForKey:UIImagePickerControllerReferenceURL];
}
这是一个很好的资源:Accessing the Camera and Photo Library from an iOS 4 iPhone Application
关于iphone - 从相机胶卷中选择的视频的 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9552088/