**************HMAppDelegate.m

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor]; UITabBarController *tab = [[UITabBarController alloc] init];
self.window.rootViewController = tab; UIViewController *vc1 = [[UIViewController alloc] init];
vc1.view.backgroundColor = [UIColor redColor];
vc1.tabBarItem.title = @"消息";
vc1.tabBarItem.image = [UIImage imageNamed:@"tab_recent_nor"];
// [tab addChildViewController:vc1]; UIViewController *vc2 = [[UIViewController alloc] init];
vc2.view.backgroundColor = [UIColor redColor];
vc2.tabBarItem.title = @"联系人";
vc2.tabBarItem.image = [UIImage imageNamed:@"tab_buddy_nor"]; vc2.view.backgroundColor = [UIColor greenColor];
// [tab addChildViewController:vc2]; UIViewController *vc3 = [[UIViewController alloc] init];
vc3.view.backgroundColor = [UIColor redColor];
vc3.tabBarItem.title = @"动态";
vc3.tabBarItem.image = [UIImage imageNamed:@"tab_qworld_nor"];
vc3.view.backgroundColor = [UIColor blueColor];
// [tab addChildViewController:vc3];
tab.viewControllers = @[vc1,vc2,vc3];
[self.window makeKeyAndVisible];
return YES;
}

IOS第14天(1,UITabBarController的基本的使用)的更多相关文章

  1. IOS 学习笔记(3) 视图UITabbarController

    1.UITabbarViewController标签试图控制器.由于标签页本就起着分类的作用,所以往往呈现的视图内容之间,可以是毫不相关的功能. UITabbarViewController仍然继承自 ...

  2. 【iOS发展-28】制造业UITabBarController标记控制器、定制UITabBarItem文字图像6途径和More评论

    一个.一个简单的制作过程(实际工程中不建议这样的方式,不要只展示所用原理的理解) 在AppDelegate.m在: - (BOOL)application:(UIApplication *)appli ...

  3. iOS UI-标签控制器(UITabBarController)

    #import "AppDelegate.h" #import "FirstViewController.h" #import "SecondView ...

  4. iOS边练边学--UITabBarController的简单使用

    一.UITabBarController的使用步骤 初始化UITabBarController 设置UIWindow的rootViewController为UITabBarController 根据具 ...

  5. iOS开发-14款状态栏(StatusBar)开源软件

    本文转载至 http://mobile.51cto.com/hot-418125.htm 之前逛街看到移动做推广,有一个定位应用挺好的,合理的利用了状态栏,做了一些消息提醒和隐藏动画,自己回家就做了一 ...

  6. iOS 学习 - 14.本地联系人

    苹果在iOS9的SDK中废除了AddressBookUI.framework的一些功能(是不是这个库都废除了,有待验证),具体和保存联系人相关的几个系统界面如下:联系人选择:AddressBookUI ...

  7. iOS学习14之OC NSNumber + NSValue

    1.NSNumber 数值类. 作用:实现基本数据类型与OC对象类型的相互转化. 1> NSNumber创建对象 // 初始化方法 NSNumber *num1 = [[NSNumber all ...

  8. IOS第14天(2, Modal控制)

    ******控制器modal - (void)btnClick { // 创建控制器对象 HMJumpViewController *jump = [[HMJumpViewController all ...

  9. AJ学IOS(14)UI之UITableView扩充_表格的修改_(增删移动)

    AJ分享,必须精品 先看效果图 代码 // // Created by apple on 14-8-19. // Copyright (c) 2014年 itcast. All rights rese ...

随机推荐

  1. SPOJ DISUBSTR 后缀数组

    题目链接:http://www.spoj.com/problems/DISUBSTR/en/ 题意:给定一个字符串,求不相同的子串个数. 思路:直接根据09年oi论文<<后缀数组——出来字 ...

  2. [工作中的设计模式]策略模式stategy

    一.模式解析 策略模式定义了一系列的算法,并将每一个算法封装起来,而且使它们还可以相互替换.策略模式让算法独立于使用它的客户而独立变化. 策略模式的关键点为: 1.多种算法存在 2.算法继承同样的接口 ...

  3. iOS 含有 中文的URL 转码问题

    非ARC模式下: - (NSString *)encodeToPercentEscapeString: (NSString *) input { NSString *outputStr = (NSSt ...

  4. JAVA StringBuilder StringBuffer String比较

    字符串连接时的效率: StringBuilder>StringBuffer>String 区别: StringBuilder效率最高,但是不是线程安全的,适用于单线程.多线程用String ...

  5. linux内存分配

    在linux的内存分配机制中,优先使用物理内存,当物理内存还有空闲时(还够用),不会释放其占用内存,就算占用内存的程序已经被关闭了,该程序所占用的内存用来做缓存使用,对于开启过的程序.或是读取刚存取过 ...

  6. CF#335 Lazy Student

    Lazy Student time limit per test 2 seconds memory limit per test 256 megabytes input standard input ...

  7. BZOJ2629 : binomial

    根据Lucas定理,等价于在$P$进制下每一位分别求组合数最后乘积模$P$. 因为答案为$0$的并不好算,所以可以考虑用$n+1$减去其它所有的答案. 那么每一位的组合数都不能是$0$,那么这就保证了 ...

  8. Hadoop2.2.0 hive0.12 hbase0.94 配置问题记录

    环境:centos6.2 Hadoop2.2.0 hive0.12 hbase0.94 1>hadoop配好之后,跑任务老失败,yarn失败,报out of memory错误,然后怎么调整内存大 ...

  9. Codeforces Round #248 (Div. 2) A. Kitahara Haruki's Gift

    解决思路是统计100的个数为cnt1,200的个数为cnt2 则 cnt1    cnt2 奇数      奇数 奇数      偶数 偶数      奇数 偶数     偶数 当cnt1为奇数时一定 ...

  10. BZOJ 3211 题解

    3211: 花神游历各国 Time Limit: 5 Sec  Memory Limit: 128 MBSubmit: 2549  Solved: 946[Submit][Status][Discus ...