首页 > 其他 > 详细

UINavigationController 与 UITabBarController

时间:2016-01-12 11:57:59      阅读:122      评论:0      收藏:0      [点我收藏+]

http://www.cnblogs.com/YouXianMing/p/3756904.html

 

// index start from 1.
UITabBarItem *newsItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemFavorites tag:1];
//UITabBarItem *homeItem = [[UITabBarItem alloc] initWithTitle:@"首页" image:[UIImage imageNamed: @""] tag:1];
NewsViewController *newsController = [[NewsViewController alloc] init];
newsController.tabBarItem = newsItem;
[newsItem release];

UINavigationController *newsNav = [[UINavigationController alloc] initWithRootViewController:newsController];
[newsController release];

// repeat other here NSArray
*viewControllers = @[newsNav]; [newsNav release]; UITabBarController *tabController = [[UITabBarController alloc]init]; // tabController.viewControllers = @[newsNav]; [tabController setViewControllers:viewControllers animated:YES]; self.window.rootViewController = tabController;

 

UINavigationController 与 UITabBarController

原文:http://www.cnblogs.com/webglcn/p/5123698.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!