Could not load NIB in bundle: 'NSBundle'

后端 未结 12 1530
礼貌的吻别
礼貌的吻别 2020-12-03 07:27

What is the error listed below?

2011-02-23 21:24:12.218 Success[7238:207] * Terminating app due to uncaught exception \'NSInternalInconsisten

12条回答
  •  旧时难觅i
    2020-12-03 08:01

    Probably, you have named your NIB in a call by lowercase letters. The simulator works fine in this case, but an iPhone device will return an error during runtime.

    For example,

    DetailViewController *detailViewController = [[DetailViewController alloc]
                initWithNibName:@"detailViewController" bundle:nil];
    

    will fail. You need to change to:

    DetailViewController *detailViewController = [[DetailViewController alloc]
                initWithNibName:@"DetailViewController" bundle:nil];
    

提交回复
热议问题