iPhone 即时更改 TabBar?
我在 iPhone 编程方面还是个新手,但我正在尽力做到最好,因为我在 OOP 方面有一些技能。
我正在创建一个基于四元素选项卡栏的 iPhone 应用程序。我想使用我的一个朋友在他自己的 iPhone 应用程序(一个三元素 TabBar 应用程序)中已经实现的其他功能。 由于我希望我的应用程序的用户可以通过按下我的应用程序的选项卡之一来“切换”到旧应用程序(3 个选项卡),我的问题是:是否可以通过“弹出我的选项卡栏”(4 个选项卡)来做到这一点和“推入旧标签栏”(3 个标签)?
为了更好地描述问题,我们可以说我正在尝试在同一个应用程序中实现“新模式”和“旧模式”。
先感谢您。
PS 我在 Macbook Pro coreDuo 上使用 Xcode 3.2.2 和 3.1.3 iPhone 模拟器
Luca
I'm quite new in iPhone Programming, but I'm trying to do my best cause I have some skills in OOP.
I'm creating an iPhone app based on a four element Tabbar. I would like to use other functionalities already implemented by a friend of mine in his own iPhone app (a three elements TabBar app).
Since I would like my app's users could "switch" to old application (3 tabs) by pressing on one of my app's tab, my question is: is it possible to do this, maybe by "popping out my tabbar" (4 tabs) and "pushing in the old tabbar" (3 tabs)?
For a better problem description, we could say that I'm trying to implement a "new mode" and "old mode" in the same application.
Thank you in advance.
P.S. I'm using Xcode 3.2.2 on a Macbook Pro coreDuo and 3.1.3 iPhone simulator
Luca
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的问题有点模糊,但是如果您希望能够在两个不同的选项卡栏之间进行选择,最简单的方法是将两个选项卡栏都包含在应用程序中,然后简单地隐藏一个你不想激活的。您仍然可以在 Interface Builder 中执行此操作。只需连接两个选项卡栏,然后让视图控制器隐藏
-viewDidLoad
中的旧选项卡栏即可。然后,当按下“旧模式”按钮时,显示旧选项卡栏并隐藏新选项卡栏。Your question is a little bit vague, but if you want to be able to choose between two different tab bars, the easiest way to do it is to include both tab bars in the application, and simply hide the one you don't want active. You can still do this in Interface Builder. Just wire up both tab bars, and let your view controller hide the old one in
-viewDidLoad
. Then, when the "old mode" button is pressed, show the old tab bar and hide the new one.