Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Storyboard crash - coding-compliant key sceneViewController

I'm getting an intermittent crash using Storyboards in iOS 5. Every so often, I get a SIGABRT when I try to instantiate a new object with a view controller from my Storyboard. It seems like a very generic error, but I can't find anyone else that's seen this. Thanks for your help!

SectionLandscapeViewController *sectionViewController = [[UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil] instantiateViewControllerWithIdentifier:@"SectionLandscapeViewController"];

And the crash...

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIProxyObject 0xa0fba20> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key sceneViewController.'
like image 471
user1360726 Avatar asked Jun 15 '12 09:06

user1360726


1 Answers

Try to use storyboard ID that different from real UIViewController class name.

like image 123
Fitsyu Avatar answered Oct 04 '22 21:10

Fitsyu