views:

46

answers:

2

I started my iPhone application as a navigation-based app which has served me well until now. In the nib for my TableViewController, I see the TableView (with its example values of California cities) but I'm able to drop any other UI elements on it (for example an UILabel).

I can add a UIWindow which gives me a separate window to add stuff onto but when I start my app all I see is the table view.

What am I missing? How do you mesh these elements together?

A: 

A UITableView is composed from cells (UITableViewCell objects).

Apple's own documentation should help out. Plus, when you get to customizing and using cells this section will help.

petert
I would agree with cirrostratus that in some cases you can use UIViewController + UITableView more effectively than UITableViewController. See this good post: http://cocoawithlove.com/2009/03/recreating-uitableviewcontroller-to.htmlIf the use-case is pretty straight-forward I'd stick with UITableViewController. If you're using core data also look out for the very useful NSFetchedResultsController.
petert
+1  A: 

You want to use UIViewController instead and put a UITableView on that. That way you can move things around at your discretion. You will have to manually implement UITableViewDelegate and UITableViewDataSource though.

Cirrostratus