带情节提要的多个控制器上的 iOS 导航

发布于 2024-12-28 21:38:45 字数 149 浏览 6 评论 0原文

我想使用类似于 TabBarController 的垂直导航。

鉴于我的问题,是否可以与IB建立故事板关系?如果没有,还有其他IB方法可以解决这个问题吗?

I have a vertical navigation that I want to use similar to a TabBarController.

In lue of my question, is it possible to set up storyboard relationships with IB? If not, is there any other IB way of going about this?

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

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

发布评论

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

评论(2

梦魇绽荼蘼 2025-01-04 21:38:45

我不确定我是否正确理解你的问题。当您在 IB 中并打开故事板时,您可以按键盘上的 ctrl 并将一条线从导航项之一拖到所需的目标视图控制器。 IB 将为您设置称为故事板转场的关系。这将处理视图控制器转换。

I'm not sure if i understand your question correctly. When you are in IB and have opened your storyboard you can press ctrl on your keyboard and drag a line from one of your navigation items to the desired target view controller. IB will setup the relationship for you which is called a storyboard segue. This will handle the view controller transition.

妳是的陽光 2025-01-04 21:38:45

根据我所做的研究,目前这是不可能的。

我最终所做的只是一个 UIViewControler ,导航按钮位于左侧,单个 UIView 位于右侧。根据触摸的导航按钮,我使用[[[NSBundle mainBundle] loadNibNamed:@"someNib​​”“膨胀”一个UIView XIB “所有者:自我选项:nil] objectAtIndex:0]

From the research I've done, this is not currently possible.

What I ended up doing was only one UIViewControler with my navigation buttons on the left and a single UIView on the right. Depending on the navigation button touched, I "inflate" a UIView XIB using [[[NSBundle mainBundle] loadNibNamed:@"someNib" owner:self options:nil] objectAtIndex:0].

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