UINavigationController 与 UITabBarController
2016-01-12 11:08
393 查看
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;
相关文章推荐
- [Leetcode] Distinct Subsequences 解题报告
- How to check in Windows if you are using UEFI
- Request processing failed; nested exception is java.lang.NullPointerException] with root cause
- Burp Suite使用介绍——Proxy功能(七)
- Burp Suite使用介绍——Proxy功能(六)
- 深入理解require与require_once与include以及include_once的区别
- 如何在UIViewController中 使用UIRefreshControl
- Burp Suite使用介绍——Proxy功能(五)
- jqGrid ---Grid can not be used in this ('quirks...
- iOS--- UITableView 底部添加按钮
- Android 讲解:基本UI 控件
- iOS 在UILabel显示不同的字体和颜色(ios6 and later)
- 本人对Material Requirements Planning模块的一些了解
- 页面对json返回自动result:<pre style="word-wrap: break-word; white-space: pre-wrap;">{"flag":"true"}</pre>问题
- iOS开发--指定UIView的某几个角为圆角
- LinkedBlockingQueue
- 使用官方API解决Navigation侧滑导致的Navigationbar异常显示和隐藏的问题
- 197,自定义UITableViewCell
- 用swagger-ui来生成webapi接口文档并可以在线测试
- Uiautomator API简介-摘要