开发者

Problem Adding UITabbar to Existing UITableView - iPhone SDK

Wonder if anyone can help me with this problem. I have created a Window based application. I have then 开发者_如何学JAVAadded 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


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜