背景在出现UIImagePickerController时显示

3

我使用了这段代码从库中选择图片:

UIImagePickerController *imagePicker = [[UIImagePickerController alloc]init];
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePicker.allowsEditing = YES;
imagePicker.delegate = self;
[self presentViewController:imagePicker animated:YES completion:^{viewLoadPhotoBg.hidden = YES;}];

我在我的项目中也使用了左侧菜单库。当UIImagePickerController出现时,左侧菜单会显示在后台。我猜测UIImagePickerController的背景颜色是透明的,根据我的搜索,一些答案说没有办法改变背景颜色。
当显示UIImagePickerController时,我该怎么做才能不看到背景?
这是截图。我覆盖了我的左侧菜单以隐藏一些敏感信息。

enter image description here


有应用程序或代码的截图吗? - shiju86.v
1个回答

1

我找到了解决方案,它真的很简单。昨天我想不出来。这是答案:

imagePicker.view.backgroundColor = [UIColor whiteColor];
imagePicker.view.alpha = 1.0;

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接