Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试通过使用自定义叠加视图来复制相机应用程序。当用户从自定义工具栏内单击按钮时,我需要显示图库。有没有办法用画廊视图替换相机视图?乍一看,我试图关闭 UIImagePickerController,然后再次对其进行配置以显示图库……但这不是预期的效果。关于如何做到这一点的任何想法?
非常感谢。
您可以将对象的sourceType属性设置为- 这将改变您的图像选择器显示的内容。UIImagePickerControllerUIImagePickerControllerSourceTypePhotoLibrary
sourceType
UIImagePickerController
UIImagePickerControllerSourceTypePhotoLibrary
sourceTypeAPI 文档