[英]How to take video file from library in iphone
I am trying to do this.I know it very simple question.我正在尝试这样做。我知道这是一个非常简单的问题。 Take Video: Take Picture: Choose from Library: Everything I find has separate buttons.
拍摄视频: 拍摄照片: 从库中选择: 我找到的所有内容都有单独的按钮。 Kinda like in the facebook app when you click on the camera button you get this picture.
有点像在 facebook 应用程序中,当您单击相机按钮时,您会得到这张照片。
I think people will me as soon as possible Thanks in advance我想人们会尽快给我提前谢谢
I can't believe this wasn't wrapped up in a little class.我不敢相信这不是用一点 class 来包装的。 So I made one
所以我做了一个
https://github.com/fulldecent/FDTake https://github.com/fulldecent/FDtake
Example there shows taking a picture and choosing a photo from library.那里的示例显示了拍照并从库中选择照片。
To take Picture, video and select an image from photo library, UIImagePickerController will help you.要从照片库中拍摄图片、视频和 select 图像,UIImagePickerController 将为您提供帮助。
Ref: UIImagePickerController参考: UIImagePickerController
To take picture and video, UIImagePickerControllerCameraCaptureMode has to be set properly.要拍照和录像,必须正确设置 UIImagePickerControllerCameraCaptureMode。
Also the sourceType needs to be set as we required.还需要根据我们的需要设置 sourceType。 See UIImagePickerControllerSourceType.
请参阅 UIImagePickerControllerSourceType。
I guess these summary will help you.我想这些总结会对你有所帮助。 See the reference for more details.
有关详细信息,请参阅参考资料。
If u want to browse thru ur photo library,如果你想通过你的照片库浏览,
UIImagePickerController* picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:picker animated:YES];
[picker release];
If u want to take new photo,如果你想拍新照片,
UIImagePickerController* picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = YES;
picker. cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentModalViewController:picker animated:YES];
[picker release];
If u want to take new video,如果你想拍新视频,
UIImagePickerController* picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = YES;
picker. cameraCaptureMode = UIImagePickerControllerCameraCaptureModeVideo;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentModalViewController:picker animated:YES];
[picker release];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.