[英]add gallery option while picking image from camera in ios
i want to add camera feature in my app but the default camera view doesn't have the option to select image from the gallery and i am doing this because i don't want to make alert view for the user to select image picker type, ie, camera or photo gallery. 我想在我的应用中添加摄像头功能,但默认摄像头视图没有选择从图库中选择图像的选项,因此我这样做是因为我不想为用户提供警报视图以选择图像选择器类型,即相机或照相馆。 how to implement this?? 如何实现呢?
UIImagePickerController *imagePicker = [[UIImagePickerController alloc]init];
[imagePicker setSourceType:UIImagePickerControllerSourceTypeCamera];
imagePicker.showsCameraControls = NO;
imagePicker.navigationBarHidden = YES;
imagePicker.wantsFullScreenLayout = YES;
imagePicker.cameraOverlayView = overlayView;
UIImagePickerController *imagePicker = [[UIImagePickerController alloc]init];
[imagePicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.