自定义UI标签栏

发布于 2024-11-25 00:44:57 字数 239 浏览 0 评论 0原文

是否有可能以这样的方式拥有一个 UITabBar,使得以下事情成为可能。

  1. 应用程序打开后,任何选项卡栏项目都不会突出显示(甚至不是第一个)。 (称为主视图)
  2. 如果选择第一个选项卡栏项目,它将转到第一个视图,依此类推。
  3. 隐藏某些选项卡栏项目的 UITabbar。
  4. 允许任何子视图返回主视图。

任何有关如何执行此操作的提示将不胜感激。

谢谢

Is it possible to have a UITabBar in such a way that the following things are possible.

  1. Once the app opens, none of the Tabbar items are highlighted (not even the first one). (call it homeview)
  2. if the first Tabbar item is selected it goes to the first view and so on.
  3. Hide the UITabbar for certain Tabbar items.
  4. Allow any subview to go back to homeview.

Any tips on how to go about doing this will be appreciated.

Thanks

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

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

发布评论

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

评论(1

过期情话 2024-12-02 00:44:57

我有类似的事情要做:

  1. 从导航控制器开始,
  2. 在某个时候显示一个 UITabBar,其中包含
  3. 来自 UITabBar 的某些控制器的多个控制器,继续从任何控制器的主导航控制器
  4. ,转到主视图(注销时)

为此,我务实地创建了 UITabBar 并将其推送到导航堆栈上,并从 UITabBar 中的控制器将其他视图推送到堆栈上。

要导航到根控制器,您可以使用以下命令:

[self.navigationController popToRootViewControllerAnimated:YES];

I had a similar thing to do:

  1. start with a navigation controller
  2. at some point show an UITabBar with multiple controllers
  3. from some controllers from the UITabBar continue the main navigation controller
  4. from any controller go to the home view (on logout)

For this to work I pragmatically created the UITabBar and pushed it on the navigation stack and from the controllers in the UITabBar I pushed other views on the stack.

To navigate to the root controller you can use this:

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