将 UITabbar 添加到现有 UITableView 时出现问题 - iPhone SDK

发布于 2024-10-25 23:07:50 字数 312 浏览 4 评论 0原文

想知道是否有人可以帮助我解决这个问题。我创建了一个基于 Window 的应用程序。然后,我将导航控制器添加到窗口(通过界面构建​​器)和 UITableViewController 子类,并使用此类中的表委托来绘制我的根视图表。这一切都很好。

我现在正在尝试向视图添加一个选项卡栏。我通过将 Interface Builder 中的 UITabbar 拖到主窗口上来完成此操作。

问题是,当我启动应用程序时,看起来表格现在正在 UITabbar 的顶部绘制,因此使得 UITabbar 无法访问。

谁能帮助我吗?

提前致谢,

马丁

Wonder if anyone can help me with this problem. I have created a Window based application. I have then added a Navigation Controller to the Window (via Interface builder) and subclassesd UITableViewController and used the table delegates in this class to draw my root view table. This all works fine.

I am now trying to add a tab bar to the view. I have done this by dragging a UITabbar in Interface Builder onto the Main Window.

The problem is that when I launch the app, it looks like the table is now being drawn over the top of the UITabbar which therefore makes the UITabbar unaccessible.

Can anyone help me ?

Thanks in advance,

Martin

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

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

发布评论

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

评论(2

挥剑断情 2024-11-01 23:07:50

查看 iOS 视图控制器编程指南:选项卡栏控制器

如果您想向应用程序添加选项卡栏,它应该是应用程序的主要导航基础。导航控制器可以是每个选项卡的一部分。

创建一个 tabBarController。使用适当的视图控制器作为其根视图控制器创建导航控制器,将导航控制器添加到一个数组中,将其设置为 tabBarController 对象的 viewControllers 数组,并将 tabBarController.view 添加到窗口中。

看看这个 线程,编码和IB 方法已在此处进行了解释。

Have a look at View Controller Programming Guide for iOS : Tab Bar Controllers

If you want to add a tab bar to your application, it should be the main navigation base of your application. Navigation Controller can be part of each tab.

Create a tabBarController. Create navigation Controllers with appropriate View Controllers as its Root View Controller, add the Navigation Controllers into one array, set it to the viewControllers aray of tabBarController object and add the tabBarController.view to your window.

Have a look at this thread, both coding & IB approach has been explained here.

独自←快乐 2024-11-01 23:07:50

更好、更简单的方法是创建带有导航的基于 UITabbar 的应用程序,并将 UITableView 添加到其中。

The better and easier approach would be to create UITabbar based application with navigation and add UITableView into that.

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