3

Ive created a new tab bar application in xcode 4 and it has generated a mainwindow.xib, firstView.xib, secondView.xib and viewController classes for each xib.

I would like to add a tableView to the firstView.xib, so i have added a UITableViewController class to the project and Xcode generated a new tableViewController.xib which displays a tableView.

How do i hook it up so the TableView is loaded into the firstView in xcode 4.

EDIT:

Ok, I've tried adding a tableViewController to the firstView.xib and setting its class name and nib properties to the name of my TableViewController class, but its not visible when the app runs.

Cheers

user346443
  • 4,672
  • 15
  • 57
  • 80

2 Answers2

0

Here is a simple tutorial http://www.techotopia.com/index.php/Creating_a_Simple_iOS_4_iPhone_Table_View_Application_(Xcode_4)

AdamG
  • 2,570
  • 3
  • 24
  • 35
0

in firstView.h, add an IBOutlet which will represent the TableViewController in firstView.xib, link the tableViewController to the corresponding File Owner IBOutlet in firstView.m, in viewDidLoad method, initialize your tableViewController.

teriiehina
  • 4,741
  • 3
  • 41
  • 63