导航栏 UITabBarController等颜色的区别
//tint color是设置你选中的那个tabBar的颜色,默认是蓝色,点击是设置的红色
vc.tabBar.tintColor = [UIColor redColor];
//bar tint color
vc.tabBar.barTintColor = [UIColor orangeColor];//背景的颜色
点击home键就是红色,背景颜色的橘色就是barTintColor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark ------------------------VC2
ViewController2 *vc2 = [[ViewController2 alloc] init]; //设置视图控制器
vc2.title = @"通讯录";
vc2.view.backgroundColor = [UIColor grayColor];
vc2.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"通讯录" image:[UIImage imageNamed:@"tabbar_contactsHL@2x"] tag:2];
//创建导航控制器
UINavigationController *nvc2 = [[UINavigationController alloc]initWithRootViewController:vc2];
nvc2.navigationBar.tintColor = [UIColor redColor];
nvc2.navigationBar.barStyle = UIBarStyleBlack;//背景是黑色
nvc2.navigationBar.translucent = NO;
.m中
self.navigationItem.rightBarButtonItem.tintColor = [UIColor greenColor];
vc2.title = @"通讯录1";是最上边中间显示的那个白色
vc2.view.backgroundColor = [UIColor grayColor]; 这个视图的背景是gray颜色
vc.tabBar.barTintColor = [UIColor orangeColor];//背景的颜色 是设置那个橘色
这个分栏控制器的名称是“通讯录”
UINavigationController *nvc2 = [[UINavigationController alloc]initWithRootViewController:vc2];创建导航控制器
取自于分栏目控制器vc2,
nvc2.navigationBar.tintColor = [UIColor redColor]; 设置导航控制器上边字体的颜色,上边的《《通讯录颜色就是红色,而
那个绿色的图标是因为在.m文件中 self.navigationItem.rightBarButtonItem.tintColor = [UIColor greenColor];,是在self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemSearch target:self action:@selector(onNext)];导航控制器创建完导航按钮后,改变他的颜色的。
导航栏 UITabBarController等颜色的区别的更多相关文章
- Android 修改底部导航栏navigationbar的颜色
Android 修改底部导航栏navigationbar的颜色 getWindow().setNavigationBarColor(Color.BLUE); //写法一 getWindow().set ...
- iOS 8 设置导航栏的背景颜色和背景图片
假设是storyboard 直接embed一个导航栏.然后在新出现的导航栏 选属性 选一下颜色就能够了 代码实现背景颜色改动:self.navigationController.navigationB ...
- iOS导航栏NavigationBar的颜色,按钮和标题以及字体颜色
首先,层级关系: leftBarButtonItem.rightBarButtonItem.title都是加在UINavigationItem上的,UINavigationItem再加在Navigat ...
- iOS史上最简单修改导航栏分隔线颜色方法!!!
override func viewDidLoad() { super.viewDidLoad() if let imageView = self.findNavLineView(view: navi ...
- 【Android开发】通过 style 设置状态栏,导航栏等的颜色
<style name="test"> <!--状态栏颜色--> <item name="colorPrimaryDark"> ...
- ios怎么让状态栏颜色和导航栏背景图片颜色一样
ios7 图片作为导航的背景的话,如果想实现状态栏和导航栏一体化,那么图片高度需要增加22,也就是64,retina是128
- iOS导航栏的背景颜色设置
方法一: (1) self.navigationController.navigationBar.barStyle = UIBarStyleDefault; self.navigationContro ...
- Navigation Bar上的返回按钮文本颜色,箭头颜色以及导航栏按钮的颜色
自从IOS7后UINavigationBar的一些属性的行为发生了变化.你可以在下图看到: 现在,如果你要修改它们的颜色,用下面的代码: self.navigationController.navig ...
- IOS7修改Navigation Bar上的返回按钮文本颜色,箭头颜色以及导航栏按钮的颜色
解决方法 1: 自从IOS7后UINavigationBar的一些属性的行为发生了变化.你可以在下图看到: 现在,如果你要修改它们的颜色,用下面的代码: 1 2 3 4 self.navigation ...
随机推荐
- Codeforces Gym 100187M M. Heaviside Function two pointer
M. Heaviside Function Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100187/ ...
- codeforces Gym 100187F F - Doomsday 区间覆盖贪心
F. Doomsday Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100187/problem/F ...
- Codeforces Round #307 (Div. 2) E. GukiZ and GukiZiana 分块
E. GukiZ and GukiZiana Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/55 ...
- C#操作Word (2)-- 打开&关闭Word文档
本文正式开始在VS2010中使用C#语言操作Word2007. 不是十分了解Word对象模型的朋友,请参考上一篇文章,或者下载:C#操作Word2007.pdf. ------------------ ...
- linux C 9*9
#include<stdio.h> #include<conio.h> #include <windows.h> void Gotoxy(int x, int y) ...
- TOJ3649欧拉回路
欧拉回路 Time Limit(Common/Java):1000MS/3000MS Memory Limit:65536KByte Total Submit: 35 ...
- 大一C语言结课设计之《学生信息管理系统》
第一次写这么长的程序,代码仅供參考,有问题请留言. /* ** 学生信息管理系统 ** IDE:Dev-Cpp 4.9.9.2 ** 2014-6-15 */ #include <stdio.h ...
- 疑难杂症:NoSuchMethodError: com.opensymphony.xwork2.util.finder.UrlSet.includeClassesUrl(Lcom/opensymphony/xwork2/util/finder/ClassLoaderInterface;)
严重: Exception starting filter struts2java.lang.NoSuchMethodError: com.opensymphony.xwork2.util.finde ...
- jQuery的如何捕捉回车键,改变事件标签
我希望有一个jQuery的解决方案,我必须接近,有什么需要做的? $('html').bind('keypress', function(e) { if(e.keyCode == 13) { retu ...
- nodejs的mysql模块学习(五)数据库连接配置之SSL
SSL选项 在SSL连接选项中需要一个字符串 或者对象 当是字符串的时候 将使用预定义的SSL配置文件 "Amazon RDS" 只有这一个预定义配置文件 用来连接到亚马逊RDS服 ...