Reputation: 24583
I just created a new xcode project with the 'Tabbed Application' template. I have a tabbed application with two tabs therefore two controllers. Both controllers are of type UIViewController. I made one of my controllers the 'settings' controller. I added a nav bar with a title of 'Settings'. All is well so far.
Then I add a TableView to the settings controller and make it a static table. Apparently I cannot have a static table view inside of a normal ViewController, it needs to live in a TableViewController.
Here is where I get very lost (still very new to iOS programming).
Am I supposed to delete the ViewController that the template provided and add a new TableViewController? I tried this however I cannot add a navbar to this type of controller.
Or is there some way to shove a TableViewController into the ViewController to get things to work.
I have looked all over today and most examples of TableViewControllers I have found are not in a tabbed application so they just create a TableViewController and move on.
Oh I also need to be compatible with iOS 5. Not sure if that makes a difference with TableViewController stuff.
Any help would be greatly appreciated.
Thanks.
Update: other option: you can follow this tutorial too.
Upvotes: 0
Views: 168
Reputation: 201
Yes, of course you can:
Update: other option: you can follow this tutorial too: Tutorial: Storyboard in XCode 4.2 with Navigation Controller and Tabbar Controller (Part 1)
Hope it helps!
Upvotes: 1