Tabbar에로드 된 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는
코드 어디 설정 내보기 : ARC하지만 스토리 보드와
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];
그리고 물론, 내가 iOS5를 사용하고 있습니다.
감사합니다.
즐겨 찾기 콘트롤러를 탭 바 컨트롤러 나 다른 곳에 추가하지 않은 것 같습니다. 그게 의도적 인거야? – Jim
음, 테스트 목적으로 이것을 변경했습니다 ... Gonna edit that that. –