I'm trying to get Xcode's iphone simulator to display by nib after the launch screen, but I keep getting this error.
Full error:
2015-03-26 21:01:40.462 Hangman Jury[5278:476697] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'HangController''
Relevant code: in AppDelegate.m:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.rootViewController = [[HangController alloc] initWithNibName:@"HangController" bundle:nil];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}
Erroring line in main.m:
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
HangController is a simple subclass of UIViewController
Things I've tried: -Spelling "HangController" correctly -Making sure View2.xib is included in Copy Bundle Resources -I have not renamed anything outside of Xcode -I'm not using storyboards and I have removed storyboard items from Info.plist -My view is linked to the target in the Target Membership list
Thanks for your help
Aucun commentaire:
Enregistrer un commentaire