我的編碼是什麼是錯誤「應用程序試圖推動一個無視圖控制器的目標<UINavigationController:0x498efa0>。」?
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
FirstTabBarItem = [[FirstMuseum alloc] init];
SecondTabBarItem = [[SecondMaps alloc] init];
ThirdTabBarItem = [[ThirdExhibition alloc] init];
FourthTabBarItem = [[FourthTabBarItem alloc] init];
first = [[UINavigationController alloc] initWithRootViewController:FirstTabBarItem];
second = [[UINavigationController alloc] initWithRootViewController:SecondTabBarItem];
third = [[UINavigationController alloc] initWithRootViewController:ThirdTabBarItem];
fourth = [[UINavigationController alloc] initWithRootViewController:FourthTabBarItem];
first.title = @"Hello";
second.title = @"Hello";
third.title = @"Hello";
fourth.title = @"Hello";
myControllerArray = [[NSMutableArray alloc] init];
[myControllerArray addObject:first];
[myControllerArray addObject:second];
[myControllerArray addObject:third];
[myControllerArray addObject:fourth];
myTabBar = [[UITabBarController alloc] init];
[myTabBar setViewControllers:myControllerArray];
localNavigationController = [[UINavigationController alloc] initWithRootViewController:myTabBar];
NSLog(@"Hello, You Tapped !"); }
是什麼錯誤, 我試圖做一個的UITabBarController有四個項目,所以現在我該怎麼辦 ??????
@ 2KV7,我給出了編碼,並且我初始化了所有四個對象,那麼爲什麼這個錯誤是? – 2011-02-28 11:27:01
我發現了這個錯誤,它在初始化的時候從我身上弄得一團糟,沒有別的......,thanx – 2011-02-28 11:30:59
Gr8。很高興你發現錯誤。快樂編碼 – visakh7 2011-02-28 11:38:41