Добър ден! Имам 5 контролера за преглед. Един от тях искам да изтласкам от UITableView клетка така:
Contacts *detailViewController = [[Contacts alloc] initWithNibName:@"Contacts" bundle:nil];
NSLog(@"%@",self.navigationController);
[self.navigationController pushViewController:detailViewController animated:NO];
в appDelegate успях да добавя контролери за root изглед като този:
mainView = [[UINavigationController alloc] initWithRootViewController:[[MainViewController alloc] initWithNibName: @"MainViewController" bundle: nil]];
secondView = [[UINavigationController alloc] initWithRootViewController:[[SearchController alloc] initWithNibName: @"SearchController" bundle: nil]];
thirdView = [[UINavigationController alloc] initWithRootViewController:[[CitySearch alloc] initWithNibName: @"CitySearch" bundle: nil]];
forthView = [[UINavigationController alloc] initWithRootViewController:[[MessengerMenu alloc] initWithNibName:@"MessengerMenu" bundle:nil]];
fifthView = [[UINavigationController alloc] initWithRootViewController:[[Contacts alloc] initWithNibName:@"Contacts" bundle:nil]];
tabBarController = [[UITabBarController alloc] init];
tabBarController.viewControllers = [NSArray arrayWithObjects: mainView ,secondView, thirdView, forthView, fifthView, nil];
[self.window setRootViewController:tabBarController];
но self.navigationController в Messenger viewController все още е нулев и натискането не се случва.
какво правя грешно
Messenger
иMessengerMenu
един и същ контролер? - person sage444   schedule 14.02.2014