Hi!
I have a Navigation-based Aplication where I have many view controllers each one with a tableview.
The access to the view controllers depends on which row the user selects.
Now i'm having a problem which is: when i select a row in the first viewcontroller i go to the second view controller but the tableview in the second view controller isn't loading. The method cellForRowAtIndexPath is never called. I get the tableview but with nothing in the rows. The tableview delegate and datasource is set to the files owner in the xib.
I will put some code to understand what i'm saying.
In the first view controller i call the second this way:
Code:
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
{
(...)
if (self.tasksController == nil) {
TasksViewController *taskCont = [[TasksViewController alloc] initWithNibName:@"TasksViewController" bundle:nil];
self.tasksController = taskCont;
[taskCont release];
}
[self.navigationController pushViewController:tasksController animated:YES]; // "Pushing the controller on the screen"
}
Thanks for your help!