crash due to "Could not load NIB in bundle"
In my开发者_运维知识库 app there is a PointMode
button. When I click on it 10 to 11 time there is no problem and the view will appear. But then after, it produces this error:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle < Simulator/4.1/Applications/04DF6214-383F-43DA-B2D2-C5B538B0095B/PW.app> (loaded)' with name 'PWPointMode''
I call that view like this.
PWPointMode *pointController = [[PWPointMode alloc]initWithNibName:@"PWPointMode" bundle:nil];
self.objPointMode = pointController;
[self.navigationController pushViewController:objPointMode animated:YES];
[pointController release];
my application is universal app
Harin
I show you code it`s by this you can load new view or nib and but u explain there as after 10-15 time of loading view your application going to show this message so for that you run your application in Performance Tool and check due to leak your resource memory not going to full. due to this problem also you get this Error message while application crash.
May be this one is useful to you...
You probably mistyped the NIB Name, check it. Also verify this file in included into the app bundle. In the 'Copy bundle ressources' build phase.
@Vince is right. The best way to prevent a misspell is by using
NSStringFromClass([myVCIvar class]);
Try autoreleasing the viewController before you push it, as when I have recieved that problem, I autorelease the instance and then push it and it works.
精彩评论