ここには同じエラーのトピックがいくつかあります。
エラーの原因は次のとおりです。
ViewControllerのインスタンスを次の方法で作成する場合:
HomepageViewController *homePageViewController = [[HomepageViewController alloc] initWithNibName:@"HomepageViewController" bundle:nil];
すべて順調。しかし、ローカリゼーションが必要です。
だから私は呼んでいます:
NSString *path= [[NSBundle mainBundle] pathForResource:[self language] ofType:@"lproj"];
NSBundle *languageBundle = [NSBundle bundleWithPath:path];
HomepageViewController *homePageViewController = [[HomepageViewController alloc] initWithNibName:@"HomepageViewController" bundle:languageBundle];
次に、シミュレーターでpng画像が「バンドル内のニブから参照された画像を識別子「(null)」で参照しているのを見ることができません。エラー」このエラーの原因は何ですか?