使用 UIImagePicker 编写一个简单的图像浏览器
我想写一个简单的图像浏览器。用户点击按钮,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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
哦,那很容易。我必须将图片细节推送到选择器上,而不是主导航控制器上。
Oh, that was easy. I have to push the picture detail onto the picker, not on the main navigation controller.