UIImagePickerController在相机滚动中打开 [英] UIImagePickerController open in camera roll

查看:195
本文介绍了UIImagePickerController在相机滚动中打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用 UIImagePickerController 直接打开相机胶卷,但仍然有你的相册列表的后退按钮?

Is it possible to open camera roll directly with UIImagePickerController but still have the back button to your album list?

UIImagePickerControllerSourceTypeSavedPhotosAlbum 将只打开相机胶卷,而不会选择滑回相册。

UIImagePickerControllerSourceTypeSavedPhotosAlbum will open only the camera roll without the option to slide back to albums.

推荐答案

不幸的是,答案是 - 这是不可能的。至少不通过任何标准接口。可能会进行一些视图层次结构挖掘或方法调整以实现它,但之后您可能会违反App Store提交的审核。

Unfortunately, the answer is -- it's not possible. At least not through any standard interface. It might be possible to do some view hierarchy mining or method swizzling to make it happen, but then you may run afoul of the App Store submissions review.

来自 iOS的相机编程主题(粗体强调我的):

From the Camera Programming Topics of iOS (bolded emphasis mine):


您不使用相机作为媒体源,而是使用Camera
Roll专辑已保存的相册,整个照片库。

Instead of using the camera as the media source, you use the Camera Roll album or Saved Photos album, or the entire photo library.

并且:


来源类型要将用于浏览已保存媒体的选择器配置为
而不是捕获新图片或电影,请设置其sourceType
属性保存到其中一张照片来源:

Source type To configure the picker for browsing saved media as opposed to capturing a new picture or movie, set its sourceType property to one of the saved photo sources:

使用 UIImagePickerControllerSourceTypePhotoLibrary 提供一个浏览器,
可以访问设备上的所有相册,包括带有相机的设备上的Camera
Roll相册。

Use UIImagePickerControllerSourceTypePhotoLibrary to present a browser that provides access to all the photo albums on the device, including the Camera Roll album on devices that have a camera.

使用 UIImagePickerControllerSourceTypeSavedPhotosAlbum 在设备上显示
限制访问相机胶卷相册的浏览器有相机的人,或没有相机的
已保存照片相册。

Use UIImagePickerControllerSourceTypeSavedPhotosAlbum to present a browser that restricts access to the Camera Roll album on devices that have a camera, or to the Saved Photos album on devices that don’t.

这篇关于UIImagePickerController在相机滚动中打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆