Reputation: 3049
So i just upgraded my XCode to 4.6 and try running my app, and it works until i try to open a view like that:
problemView *cvc=[[problemView alloc] init];
[self.navigationController pushViewController:cvc animated:YES];
In my app i use a lot identical calls but there is no problem, the problem is only with that view. I don't get any crash report after executing second line it just go to:
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
When i was debugging i found out that my init method gets called and works fine, but my viewdidLoad method newer gets called. My init is preaty standard:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.title = @"Seznam";
self.tabBarItem.image = [UIImage imageNamed:@"menu-skodnicentri.png"];
}
return self;
}
Any ideas? Just yesterday it was working fine...
edit:
2/15/13 10:38:04.080 AM ZM[45906]: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "CentriVC" nib but didn't get a UITableView.'
*** First throw call stack:
Upvotes: 1
Views: 211
Reputation: 3049
I found a solution, all i needed to do was add that function:
- (void)loadView {
[super loadView];
}
I got it here :loaded the "PersonnalDetails" nib but didn't get a UITableView
Upvotes: 1
Reputation: 25318
Your view controller is of type UITableViewController
and is expected to create a UITableView
in loadView (ie your view
property must be an instance of type UITableView
). As you use a nib file for your view controller, go into Interface Builder and make sure that the view
outlet is connected to a UITableView
(or a subclass of UITableView
)
Upvotes: 0