gpt4 book ai didi

iphone - 如何在iPad上正确使用UIImagePickerController?

转载 作者:行者123 更新时间:2023-11-28 23:11:07 24 4
gpt4 key购买 nike

来自 UIImagePickerController 的文档:

On iPad, present the user interface using a popover. Doing so is valid only if the sourceType property of the image picker controller is set to UIImagePickerControllerSourceTypeCamera.

所以他们说的是:

  • 在 iPad 上,我必须使用 UIPopoverController 来显示图像选择器。
  • 但同时限于UIImagePickerControllerSourceTypeCamera

UIImagePickerControllerSourceTypePhotoLibraryUIImagePickerControllerSourceTypeSavedPhotosAlbum 等其他源类型怎么样?

在我的例子中,我希望用户从他的照片库中选择而不是用相机拍照。

有没有办法在 iPad 上使用 UIImagePickerController 从图库中挑选照片?

最佳答案

我怀疑文档中有错字。我已经在 iPad 上成功地将 UIImagePickerController 与其他 sourceTypes 一起使用 - 只需确保它在 UIPopoverController 中即可。

关于iphone - 如何在iPad上正确使用UIImagePickerController?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8236397/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com