OC--初始化UINavigationController
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// create a navigation controller and perform some simple styling
self.navigationController = [UINavigationController new];
self.navigationController.navigationBar.barTintColor = [UIColor darkGrayColor];
[self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];
// create and navigate to a view controller
UIViewController *viewController = [self createInitialViewController];
[self.navigationController pushViewController:viewController animated:NO];
// show the navigation controller
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.rootViewController = self.navigationController;
[self.window makeKeyAndVisible];
return YES;
}
- (UIViewController *)createInitialViewController {
self.viewModelServices = [[RWTViewModelServicesImpl alloc] initWithNavigationController:self.navigationController];
self.viewModel = [[RWTFlickrSearchViewModel alloc]
initWithServices:self.viewModelServices];
return [[RWTFlickrSearchViewController alloc]
initWithViewModel:self.viewModel];
}
OC--初始化UINavigationController的更多相关文章
- iOS开发——控制器OC篇&UINavigationController&UITabBarController详解
UINavigationController&UITabBarController详解 一:UINavigationController 控制器的属性: UINavigationControl ...
- iOS UINavigationController(内容根据iOS编程编写)
我们知道 UITabBarController 对象,可以通过使用该对象,用户可以切换不同的屏幕.当要切换的各个屏幕之间没有相互依存关系的时候,该对象可以很好的完成任务.但是当多个屏幕互有关系的时候, ...
- IOS 学习 开发 自定义 UINavigationController 导航
文件目录如下:基本导航顺序: root -> First -> Second -> Third.其中,FirstViewController作为 navigation堆栈的rootv ...
- [iOS基础控件 - 6.11.2] - UINavigationController 多控制器 简单使用
A.概念 1.通常一个app有多个控制器 2.需要对这些控制器进行管理 3.有多个view的时候,用一个父view去管理多个子view 4.控制器管理也是如此,使用给一个父控制器,去控制子控制器 ...
- 站在OC的基础上快速理解Swift的类与结构体
阅读此文章前,您已经有一定的Object-C语法基础了!) 2014年,Apple推出了Swift,最近开始应用到实际的项目中. 首先我发现在编写Swift代码的时候,经常会遇到Xcode不能提示,卡 ...
- iOS开发之UINavigationController
1.概述: 利用UINavigationController,可以轻松地管理多个控制器,轻松完成控制器之间的切换,典型例子就是系统自带的“设置”应用. 2.UINavigationController ...
- iOS UI基础-11.0 UINavigationController
导航控制器 利用UINavigationController,可以轻松地管理多个控制器,轻松完成控制器之间的切换,典型例子就是系统自带的“设置”应用 UINavigationController的使用 ...
- IOS 导航控制器基本使用(UINavigationController代码创建方式)
● UINavigationController的使用步骤 ➢ 初始化UINavigationController ➢ 设置UIWindow的rootViewController为UINavigati ...
- iOS Programming UINavigationController
iOS Programming UINavigationController the Settings application has multiple related screens of info ...
- 控制器管理UINavigationController、UINavigationBar
控制器管理 掌握 控制器以及view的多种创建方式 UINavigationController的简单使用:添加\移除子控制器 UINavigationBar内容的设置 控制器的生命周期方法 Segu ...
随机推荐
- ng-bind-html在ng-repeat中问题的解决办法
<div ng-controller="MyCtrl"> Hello, {{name}}! <div class="row" ng-repea ...
- chrome下如何显示打开网页的IP地址
Website IP:装上之后在网页右下角能够显示当前访问网页的IP地址,这个对定位哪台前端机是有问题的,特别有帮助.
- 配置suricata
yum -y install libpcap libpcap-devel libnet libnet-devel pcre \ pcre-devel gcc gcc-c++ automake auto ...
- 管理Fragments(转)
转:原文链接 http://www.cnblogs.com/mengdd/archive/2013/01/09/2853254.html 管理Fragments FragmentManager 为了管 ...
- HDU 4287 Intelligent IME(字典树)
在我没用hash之前,一直TLE,字符串处理时间过长,用了hash之后一直CE,(请看下图)我自从经历我的字典树G++MLE,C++AC以后,一直天真的用C++,后来的CE就是因为这个,G++才支持这 ...
- adb shell 命令详解,android
http://www.miui.com/article-275-1.html http://noobjava.iteye.com/blog/1914348 adb shell 命令详解,android ...
- FCKeditor文字编辑器
FCKeditor文字编辑器的js调用1.需要fckeditor包 下载地址 http://dl.pconline.com.cn/html_2/1/776/id=48351&pn=0.html ...
- STM32的优先级NVIC_PriorityGroupConfig的理解及其使用(转)
源:http://blog.csdn.net/yx_l128125/article/details/9703843 写作原由:因为之前有对stm32 优先级做过研究,但是没时间把整理的东西发表,最近项 ...
- javascript中0.01*2324=23.240000000000002 ?
js中的乘法运算的小问题 0.01*2324=23.240000000000002 ? , 结果为什么出现这么多小数位呢?
- Javascript 浏览器探测
1.根据浏览器的性能 var is = { ff: window.globalStorage, ie: document.all && !window.opera, ie6: !win ...