我应该使用哪个视图来显示 TabBar 应用程序中的大照片

发布于 2024-07-24 10:06:59 字数 323 浏览 4 评论 0原文

您好,我使用了带有 4 个选项卡的选项卡栏应用程序,并且我已经从 IB 设置了导航控制器。

现在我的照片视图,当用户从列表中选择照片,它应该显示大照片。 对于较大的照片,我应该使用哪个视图? 如果我将 self.view ,它将显示选项卡栏和导航栏。 如果我给 tabbarcontroller..view 那么导航控制器不会显示。 当用户点击图像时我需要导航控制器。

Hi i have used Tab Bar Application with 4 tabs and i have set navigation controller from IB.

Now for my photo view, when user choose photo from list, it should display large photo. For larger photo, which view should i use?. If i will self.view and it will display both tab bar and navigation bar. If i will give tabbarcontroller..view then navigation controller is not displayed. I need navigation controller when user tap on image.

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

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

发布评论

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

评论(1

夢归不見 2024-07-31 10:06:59

如果您希望标签栏在用户点击图像时消失,您可能应该将界面基于子类 UINavigationController 并手动插入标签栏(不带控制器)。 您必须在 UINavigationController 子类中处理来自选项卡栏的事件。 当用户点击图像时,您可以简单地将其设置在由单独的 UIViewController 控制的 UIImageView 中,并将该控制器推送到导航控制器的堆栈上。

(网上有关于如何组合导航和标签栏界面的教程。您可能会找到其他方法来完成您需要的操作)。

If you want the tab bar to disappear when the user taps on an image, you should probably base the interface on a subclassed UINavigationController and insert a tab bar (without controller) manually. You'll have to handle events from the tab bar in your UINavigationController subclass. When the user taps an image, you can simply set it in a UIImageView controlled by a separate UIViewController and push that controller on the nagigation controller's stack.

(There are tutorials on-line on how to combine a navigation and tab bar interface. You might find other ways of doing what you need).

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