导航控制器下方的自定义标签栏问题iphone

发布于 2024-09-26 23:48:45 字数 974 浏览 2 评论 0原文

我在导航控制器下方创建了一个自定义可滚动选项卡栏 [带有按钮的滚动视图]。我在底部的标准选项卡控制器中已经有两个选项卡栏。对于标准底部选项卡,我在 xib 中创建了两个导航控制器,并为两者提供了两个不同的笔尖。我正在下部选项卡之一加载表格视图,该选项卡与具有导航控制器引用的上部选项卡之一相同。

问题是在第二个上部选项卡中,我有一个 viewController 但它没有 navigationcontroller 引用,因为我无法在 main.xib 中将其引用提供给上部选项卡,因为该选项卡不是实际的选项卡xib。

我尝试将应用程序委托的导航控制器出口引用提供给该特定视图控制器中本地创建的导航控制器,而无需导航引用。因此,原本为零的导航控制器引用现在不会为零,并在记录时向我显示应用程序委托的导航控制器引用,但我仍然无法更改其标题或任何栏按钮。

我想知道是否真的有可能拥有带有不同视图控制器的标准选项卡栏以及带有自己不同选项卡和视图控制器的上部选项卡栏以及每个选项卡的导航参考?

我见过这样的应用程序,但在这种情况下,每个上部选项卡都具有相同的视图,例如每个选项卡的 tableview 仅不同的数据源,这是可能的,因为您已经在下部选项卡之一中拥有视图控制器的引用,您可以将其保留为通用的所有上面的选项卡。

这是设置的屏幕截图。

替代文本

上部选项卡包含两个选项卡:Newsfeed 和 Top 1000 公司。 Newsfeed 中的 tableview 实际上是加载在下部选项卡 Newsfeed 中的 nib 文件。但另一个上部选项卡“Top 1000 Companies”的笔尖未在此设置中加载,因为上部选项卡栏只是虚拟的。因此,在此设置中,我无法将导航控制器提供给“1000 强公司”的视图控制器。

提前致谢。

这真的很紧急。

I have created a custom scrollable tabbar [scrollview with buttons over it] below navigationcontroller. I have two tabbars already in standard tabcontroller at the bottom. For the standard bottom tabs, I have created two navigationcontrollers in xib with two different nibs for both. I'm loading a tableview in one of the lower tabs which is common to one of the upper tabs which is having the navigationcontroller reference.

The issue is in the second upper tab I'm having a viewController but it's not having the navigationcontroller reference as I am not able to give its reference in my main.xib to the upper tab as that tab is not an actual tab with respect to the xib.

I tried giving the app delegate's navigationcontroller outlet reference to locally created navigationcontroller in that particular viewcontroller without the navigation reference. So the otherwise nil navigationcontroller reference isn't coming nil now and showing me the app delegate's navigationcontroller reference when logged, but I'm still not able to change its title or any of the barbuttons for that matter.

I want to know wheather it's really possible to have standard tabbar with different viewcontrollers as well as upper tabbar with its own different tabs and viewcontrollers along with navigation reference for each?

I have seen such app but in that case each of the upper tabs are having the same view for example tableview only different datasource for each tab which is possible as you already have a viewcontroller's reference in one of the lower tabs which you can keep common to all the upper tabs.

This is the screenshot of the setup.

alt text

Upper tabbar contains two tabs: Newsfeed and Top 1000 companies.
The tableview in Newsfeed is actually the nib file which is loaded inside lower tab Newsfeed. But the other upper tab "Top 1000 companies"'s nib isn't loaded in this setup as the upper tabbar is just virtual. So in this setup I'm not able to give navigationcontroller's reference to the "Top 1000 companies"'s viewcontroller.

Thanx in advance.

This' really urgent.

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

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

发布评论

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

评论(1

勿忘初心 2024-10-03 23:48:45

好的,我找到了这个问题的答案。很多时候,以编程方式做事比通过界面生成器更有帮助。

Ok, I found out the answer for this question. Many a times doing things programmatically than through interface builder helps.

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