如何显示图库中的照片?

发布于 2025-01-04 18:31:14 字数 151 浏览 3 评论 0原文

我正在使用 UIImagePickerController 和源类型 UIImagePickerControllerSourceTypePhotoLibrary,我的想法是我想在调用委托之前将选取的照片显示为全屏,就像使用 navigationController 推送到另一个视图一样?

I'm using UIImagePickerController with source type UIImagePickerControllerSourceTypePhotoLibrary, the idea is i want to display the photo picked to full screen before the delegate will be called like using a navigationController to push to another view?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

扬花落满肩 2025-01-11 18:31:14

您可以尝试更改委托方法的行为。从相机胶卷中选择图像后,在委托方法中,您可以创建一个新的视图控制器并将其显示为模式。然后在此视图控制器中插入两个按钮:

  1. 第一个,用于拒绝图像并再次打开相机胶卷
  2. 第二个,用于接受图像

要再次打开相机胶卷,基本上,您必须再次调用 open 方法(我想此方法作为 UIButton 的目标附加)。

You can try to change the behavior of delegate method. After you select the image from the camera roll, in the delegate method you can create a new view controller and shown it as modal. Then insert two button in this view controller:

  1. the first, used for reject the image and open again the camera roll
  2. the second, used for accept the image

For open again the camera roll, basically, you must call the open method again (i suppose this method is attached as target of a UIButton).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文