2
votes

I am using the same technique as i populate my UITableView in iphone while writing my iPad application. Tab Bar Controller >UINavigationController>UITableViewController of type myCustomTable(load From NIB)

MyCustomTableViewController NIB and class file implements the delegate methods

@interface MyCustomTableViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource> {

 NSMutableArray *PDFList;
 IBOutlet UITableView *PDFTable;

}

but my delegate methods are not getting called. What do i do?

3
fyi, I believe the newly preferred pattern is to specify IBOutlet in the @property declaration. [eg @property (nonatomic, retain) IBOutlet UITableView *PDFTable]DougW
I have already set this propertyjAmi

3 Answers

9
votes

Found the solution....

in the tableView delegate method - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView

i was returning 0 and hence none of the delegate methods were being called.

3
votes

Did you set the delegate and datasource of the table in IB? If you have, and everything is wired up, it should work.

FWIW - This is my biggest problem with nibs. If you run into problems it's much harder to ask for help from people who aren't local.

1
votes

Make sure you have properly set your 'Class' in Identity Inspector (Tools -> Identity Inspector) in Interface Builder. Also set the appropriate 'Referencing Outlet' in Interface Builder.