Я новичок в iOS, и у меня возникли проблемы с отображением контроллера навигации в моем taBbar после обновления Xcode 6.Сочетание TabBar и навигационного контроллера IOS8
С Xcode 5, это было прекрасно, но сейчас работает на тренажере я получаю сообщение об ошибке «Нагрузочного приложение из-за неперехваченное исключение„NSInvalidArgumentException“, причиной:„Раздвигая навигационный контроллер не поддерживается“» и приложение сбои. Вот мой код:
**appDelegate.m**
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:
(NSDictionary *)launchOptions{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor =[UIColor whiteColor];
[self.window makeKeyAndVisible];
*// tabBar items*
ItemUnViewController *itemUnViewController = [[ItemUnViewController alloc]
initWithNibName:nil
bundle:NULL];
ItemDeuxViewController *itemDeuxViewController = [[ItemDeuxViewController alloc]
initWithNibName:nil
bundle:NULL];
*//tabBar*
UITabBarController *tabBarController = [[UITabBarController alloc] init];
[tabBarController setViewControllers:@[itemUnViewController,itemDeuxViewController]];
*//setting tabBar as rootView*
self.window.rootViewController = tabBarController;
*// navigation Controllers*
UINavigationController *itemUnNavigationController =
[[UINavigationController alloc]
initWithRootViewController:itemUnViewController];
UINavigationController *itemDeuxNavigationController =
[[UINavigationController alloc]
initWithRootViewController:itemDeuxViewController];
*//Combining tabBar and Navigation Controllers*
[tabBarController setViewControllers:@
[itemUnNavigationController,itemDeuxNavigationController]];
return YES;
}
Я даже попробовал этот способ http://blog.rifkilabs.net/exploring-navigation-controller-and-tab-bar-controller.html но я получаю то же сообщение об ошибке.
Благодарим за помощь.