私はViewControllerを持っています。これはタブバーにロードされています。ViewControllerを表示しようとすると奇妙なエラーが発生する
全部は、プログラムがSIGABRT
を受け取り、このエラーで私の葉が表示されます瞬間
:それが意味することができるもの
2012-03-01 21:53:21.118 GameControl[78897:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<FavoriteViewController 0x68c8620> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key singleton.
誰でもアイデアを?
HERESにコードIセットアップ私の意見:
RootViewController *rootController = [[RootViewController alloc] initWithNibName:@"RootViewController" bundle:nil];
FavoriteViewController *favoriteController = [[FavoriteViewController alloc] initWithNibName:@"FavoriteViewController" bundle:nil];
rootController.xmlData = self.xmlData;
favoriteController.xmlData = self.xmlData;
navigationController = [[UINavigationController alloc] initWithRootViewController:rootController];
tabBarController = [[UITabBarController alloc] init];
navigationController.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"Root" image:nil tag:0];
favoriteController.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"Favorites" image:nil tag:0];
tabBarController.viewControllers = [NSArray arrayWithObjects:navigationController, favoriteController, nil];
if ([[self.window subviews] count] != 0) {
[[[self.window subviews] objectAtIndex:0] removeFromSuperview];
}
[self.window addSubview:tabBarController.view];
、よく、私はARCしかし、誰ストーリーボードとIOS5を、使用しています。
ありがとうございます!
お気に入りコントローラーをタブバーコントローラーに追加していないかのようです。それは意図的なのでしょうか? – Jim
まあ、テストの理由でこれを変更しました... これを編集するつもりです。 –