iOS Help: loaded the nib but the view outlet was not set

Viewed 5567

I have a class called TaskListViewController and I am going to ShowTaskViewController. In the beginning in ShowTaskViewController I didn't have a view object I only Had a TableView object where I was dynamically loading data from a database and it worked fine.

Now I deleted the TableView object in ShowTaskViewController class and I dragged and dropped a View object in the .xib file and also dragged and dropped a TableView object on top of it because I want to have some additional buttons in that class, but now its showing me this error: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "ShowTaskViewController" nib but the view outlet was not set.'

Also this is the code I used to go to the ShowTaskViewController class before when it worked fine, now please help me to make the changes so the TableView object loads data properly.

-(IBAction)showAllTasks:(id)sender
{
    ShowTaskViewController *showTaskViewController = [[ShowTaskViewController alloc] initWithNibName:@"ShowTaskViewController" bundle:nil];

    [self presentModalViewController:showTaskViewController animated:YES];
}
2 Answers
Related