iPhone - UITableViewController not loading table

Posted by RyanJM on Stack Overflow See other posts from Stack Overflow or by RyanJM
Published on 2010-06-15T21:09:00Z Indexed on 2010/06/15 21:12 UTC
Read the original article Hit count: 273

I'm pushing a UITableViewController onto a navigationController. The title (set in the viewDidLoad) shows up but not the table.

numberOfSectionsInTableView is called. But tableView:numberOfRowsInSection: is not called. I'm passing in 1 so it should be looking for number of rows.

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}

I'm setting up the view in the following manner:

SelectUserViewController *nextController = [[SelectUserViewController alloc] initWithStyle:UITableViewStyleGrouped];  
nextController.managedObjectContext = managedObjectContext;

OrangeQCAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
[delegate.navigationController pushViewController:nextController animated:YES];

Again, the viewDidLoad method is called. And my class is set up as follows:

@interface SelectUserViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource> {...}

What else should I be looking at? When I go through the debugger, after it looks at numberOfSectionsInTableView it just disappears (I think it is in the UITableViewController class) and never comes back.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uinavigationcontroller