Just ran into this very frustrating problem when trying to add a new view, I have 2 different types of view: LargeCoverViewController and CoverViewController.
I created a LargeCoverViewController like this:
LargeCoverViewController *tmpCover = [[LargeCoverViewController alloc] initWithNibName:@"LargeCoverViewController" bundle:nil andIssue:issue];
That just works, but when I try to create a CoverViewController, it refuses to work
CoverViewController *tmpCover = [[CoverViewController alloc] initWithNibName:@"CoverViewController" bundle:nil andIssue:issue];
I’m thinking it has something to do with the .xib file, when I do like this it “works” again
CoverViewController *tmpCover = [[CoverViewController alloc] initWithNibName:@"LargeCoverViewController" bundle:nil andIssue:issue];
In Interface Builder the class is set properly, my view is linked up correctly. (It’s basically just a copy of the LargeCoverViewController), am I still missing something?
It’s getting very frustrating …
EDIT:
My application doesn’t crash, if my nibname was wrong the application should crash, which isn’t the case here.
Try creating new separate XIB file rather copying whole XIB file and then copy the UI outlets and views from other XIB to this newly created XIB file.
Sometimes, Xcode gets confused with copy-pasting. I know this is not proper solution but sometimes it works. 🙂