ios - 删除 iphone 中的 "choose from gallary"选项?

标签 ios iphone html uiimagepickercontroller

<分区>

我正在开发一个项目,该项目提供从任何手机捕获图像并将其上传到网站服务器的功能。

但我在使用 iphone 时遇到问题。

当用户点击 Snap it 按钮时,它也会显示“从图库中选择”选项。

这是图片:

enter image description here

是否可以禁用此选项?每当使用此网站时,如何从 iphone 禁用此选项?

我想删除选项“选择现有”。

最佳答案

试试这个代码:

        UIImagePickerController *imagePickController=[[UIImagePickerController alloc]init];
        //You can use isSourceTypeAvailable to check

        if ([UIImagePickerController    isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
        {
            imagePickController.sourceType=UIImagePickerControllerSourceTypeCamera;
            imagePickController.showsCameraControls=YES;
            //  self.usingPopover = NO;
        }
        else if ([UIImagePickerController  isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {//Check PhotoLibrary  available or not
            imagePickController.sourceType=UIImagePickerControllerSourceTypePhotoLibrary;
            imagePickController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
        }
        else if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeSavedPhotosAlbum]) //Check front Camera available or not
            imagePickController.sourceType=UIImagePickerControllerSourceTypeSavedPhotosAlbum;
        //else //!!!!!!!!!!!exception

        imagePickController.delegate=self;
        imagePickController.allowsEditing=NO;

        [self presentModalViewController:imagePickController animated:YES];

关于ios - 删除 iphone 中的 "choose from gallary"选项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29935324/

相关文章:

ios - 将解析平台与 JSQMessagesViewController Swift 结合使用

iphone - 将项目添加到 NSMutableArray 不起作用

iphone - HoughCircles 给出了错误的圈数和位置 - iOS

javascript - jQuery 用动画改变图像并等待它触发超链接

ios - 同一个 xib 上的多个 "content views"

ios - 在 IOS 上使用 Facebook 应用程序打开 Facebook 群组页面

ios - 无法在 Identity Inspector 中设置自定义 UITextView

ios - iOS 开发人员如何称呼页面底部指示应用程序中打开的窗口数的点?

java - XPath//*[@href] 不仅仅抓取链接

html - 将输入文本颜色设置为红色, "skip"类内的输入除外