使用 UIImagePicker 编写一个简单的图像浏览器

发布于 2024-08-05 10:17:52 字数 287 浏览 2 评论 0原文

我想写一个简单的图像浏览器。用户点击按钮,UIImagePicker 弹出,用户选择照片,显示大细节,用户点击“后退”按钮并返回选择器。除了最后一部分(返回选择器)之外,一切都很简单。选择器是一个模态视图,因此我必须关闭它才能显示图片细节。然而,一旦我放弃它,我就无法轻易回到它。 (我必须重新打开它,用户将返回索引而不是最后打开的相册。)我尝试保持选择器打开,但是当我打开时,我的导航控制器的 pushViewController 方法不起作用尝试推动图片细节。我做错了什么?你会如何写一个如此简单的画廊?

I would like to write a simple image browser. User taps a button, UIImagePicker springs up, user selects photo, large detail gets displayed, user taps a ‘back’ button and is back in the picker. Everything is quite easy except the last part, the returning to the picker. The picker is a modal view, so that I have to dismiss it in order to display the picture detail. Once I dismiss it, though, I cannot easily return to it. (I’d have to reopen it and user would get back to the index instead of the last album open.) I tried keeping the picker open, but then my navigation controller’s pushViewController method does not work when I try to push the picture detail. What am I doing wrong? How would you write such a simple gallery?

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

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

发布评论

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

评论(1

挽梦忆笙歌 2024-08-12 10:17:52

哦,那很容易。我必须将图片细节推送到选择器上,而不是主导航控制器上。

Oh, that was easy. I have to push the picture detail onto the picker, not on the main navigation controller.

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