views:

39

answers:

2

Hi,

I'm new to iphone development. I have a tabBar App, designes in interfaceBuilder. When I pressão the About button, it flips to a view where I put the App info. In this view, I need to have a navigaionController with a tableView. How can I do this? I'm having a lot of trouble to do this. Anyone can help Me?

iChat: [email protected]

A: 

So, I guess you simply want to show a UITableView inside a UINavigationController inside a UITabBarController. This is fairly simple:

First, you should create the ViewController which will contain your TableView. You might have already done this, so just the quick walkthrough: Click "New File" and create a "UIViewController subclass". It's easiest to check "UITableViewController subclass", but a more flexible approach would be to subclass UIViewController and fill it with a TableView in InterfaceBuilder or programmatically. If you need help here, just ask.

Once you created your "AboutViewController", open your TabBarController (most likely in the "MainWindow") in InterfaceBuilder. Now, select the TabBarController, and add a new Tab in the Inspector. Change the Tab's Class from ViewController to Navigation Controller. Inside your newly created NavigationController, there will be a "View Controller (Item)". Select it and, in the Inspector, change it's class to "AboutViewController" (or however you called it). If you created a XIB for your AboutViewController, don't forget to change the value of "NIB Name" in inspector.

Phlibbo
Hi, i guess i wasn't clear. I have a tabBar App. On the top right, I have the i button (info button). When I press the infoButton, it flips over to another view, in which there is no tabBar. Just a plain view. In that plain view i need to put a navigationController, with a tableView,
Rui Lopes