-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My View Controller is not loading with error Terminating app due to uncaught exception 'NSInternalInconsistencyException #211
Comments
Hey, You are not configuring it correctly for a Storyboard app. Look at the Storyboard demo. Here is my own code to help:
Also make sure the starting point in your app is the container, NOT your navigation controller. Your startViewController and navigationController methods also seem pointless to me: just create the links in IB directly, that’s what it’s for. At the least, remove
|
Sir it is giving this Error Now.. I have configured my appdelegate.m file with this code now..
|
I have 2 VCs
1 is My Demo and the other is my sideVC in Stordyboard file with an embeded Navigation Controller to my DemoVC.
i just copy your demoBasicApp delegate code to load my view just like this.
//////////////////////// Code in AppDelegete
(ViewController *)startViewController {
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
ViewController *vc =[[ViewController alloc]init];
vc = [storyboard instantiateViewControllerWithIdentifier:@"start"];
return vc;
}
(UINavigationController *)navigationController {
return [[UINavigationController alloc]
initWithRootViewController:[self startViewController]];
}
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
SideViewController *sideViewController = [[SideViewController alloc]init];
sideViewController = [storyboard instantiateViewControllerWithIdentifier:@"SideViewController"];
MFSideMenuContainerViewController *container = [MFSideMenuContainerViewController containerWithCenterViewController:[self startViewController] leftMenuViewController:sideViewController rightMenuViewController:nil];
self.window.rootViewController = container;
[self.window makeKeyAndVisible];
// Override point for customization after application launch.
return YES;
}
But it gives an Error..
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/applezone/Library/Developer/CoreSimulator/Devices/BA1DB1A1-D29B-4287-A232-79598EB77E11/data/Containers/Bundle/Application/2A1CA986-E75B-41FF-99A5-DD3027325CCA/PropertyProject.app> (loaded)' with name 'UINavigationController-Rpb-xy-BRz' and directory 'Main.storyboardc''
The text was updated successfully, but these errors were encountered: