简体   繁体   English

在iOS中从相机中选取图像时添加图库选项

[英]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.

相关问题 通过UIImagepickerController从Camera拾取图像并将其保存到ios中的相册后,获取图像名称 - Get image name after picking image from Camera through UIImagepickerController and saving it to photos album in ios 如何避免从照片库中选择或从ios中的相机中捕获的图像的背景? - how to avoid background for an image which is selected from photo gallery or captured from Camera in ios? 如何为iOS / iPhone或Android图片库添加“共享”选项? - How can I add a “share” option to an iOS/iPhone or Android image gallery? 来自iOS中服务器的图像库 - image gallery from server in ios iOS:将图像从库复制到文档 - iOS: copy image from gallery to documents 如何在iOS相机中添加其他图像或动画 - how to add another image or animation in iOS camera 如何获取图像的路径,从图库中选择或通过相机捕获的图像 - How to get path for image, selected from gallery or captured through camera 仅当从相机拍摄图像时,在ios 5.1.1中显示内存警告后,应用程序崩溃 - App crashes after showing memory warning in ios 5.1.1 only while taking image from camera 从Front Camera iOS 5.0捕获时始终看到镜像 - Always seeing Mirror image while capturing from Front Camera iOS 5.0 在iOS中从相机胶卷获取特定图像 - Fetching specific image from Camera roll in iOS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM