2012-01-10 2 views
0

Я все еще новичок в приложении iphone. девиация , Я создаю приложение на основе навигации с помощью uiNavigationController, проблема в том, что когда я выбрал навигационный контроллер и установил нижнюю панель для вкладок, никаких вкладок нет, также когда я добавляю uitabcontroller, нет вкладки.Как добавить вкладки в UINavigationController

Как добавить вкладки в UINavigationController с помощью mainwindow.xib? ссылки, учебники или любые предложения?

ответ

0

Вот пример кода для создания tabBarController с двумя контроллерами закладками:

myTabBarController = [[UITabBarController alloc] init]; 
NewsFeedController * newsFeedController = [[NewsFeedController alloc] initWithFacebook:facebook]; 
UINavigationController * navigationControllerHome = [[UINavigationController alloc] initWithRootViewController:newsFeedController]; 
[newsFeedController release]; 
AboutController * aboutController = [[AboutController alloc] init]; 
UINavigationController * navigationControllerAbout = [[UINavigationController alloc] initWithRootViewController:aboutController]; 
[aboutController release]; 
myTabBarController.viewControllers = [NSArray arrayWithObjects:navigationControllerHome, navigationControllerAbout, nil]; 
[self.window addSubview:myTabBarController.view]; 
Смежные вопросы