iPhone Application crashing upon loading a new Detail View
- by Jeb Sears
Hi, My problem is when trying to load a detail view through a table cell, the application constantly crashes. The error that comes up when running through debug is "__TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___" objc exception thrown. If anyone can help me it would be greatly appreciated.
Here is a screenshot for the debug, I am not sure if I am interpreting it right
http://img43.imageshack.us/img43/2143/errorud.png
Here is my code where I beleive the error is happening:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSInteger row = [indexPath row];
if(self.moreDetailView == nil){
DetailViewController *dvController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:[NSBundle mainBundle]];
self.moreDetailView = dvController;
[dvController release];
}
else{}
moreDetailView.title = [NSString stringWithFormat:@"%@", [listOfItems objectAtIndex:row]];
goHerdv2AppDelegate *delegate = [[UIApplication sharedApplication] delegate];
[delegate.detailView pushViewController:moreDetailView animated:YES];}