IOS 导航栏属性设置
IOS 7 以上系统导航栏:
- [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]]; // 返回按钮颜色
- [UINavigationBar appearance].barTintColor = YK_BUTTON_COLOR; //背景颜色
- [[UINavigationBar appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],NSForegroundColorAttributeName,[UIFont boldSystemFontOfSize:17],NSFontAttributeName, nil]]; //标题title属性
IOS6以上自定义导航栏:
- /*自定义标题*/
- UILabel *vTitleLable = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 21)];
- vTitleLable.font = [UIFont boldSystemFontOfSize:17];
- vTitleLable.textColor = [UIColor whiteColor];
- vTitleLable.textAlignment = NSTextAlignmentCenter;
- vTitleLable.backgroundColor = [UIColor clearColor];
- vTitleLable.text = _titleStr;
- [self.navigationItem setTitleView:vTitleLable];
- /*自定义返回按钮*/
- UIBarButtonItem *vLeftButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(backButtonClicked:)];
- self.navigationItem.leftBarButtonItem = vLeftButtonItem;
- [vLeftButtonItem release];
IOS 导航栏属性设置的更多相关文章
- IOS导航栏颜色渐变与常用属性
(转:http://www.cnblogs.com/Lingchen-start/archive/2015/10/23/4904361.html) 今年很忙,忙的写日志的时间都很少. 少的可怜. 自 ...
- iOS - 导航栏UINavigationController经常使用属性
1.设置导航栏标题 self.title = @"dylan_李伟宾"; 2.设置导航栏样式 设置方法: [self.navigationController.navigation ...
- 导航栏视图设置 tabbleView 是设置总背景图
//导航栏视图设置 tabbleView 是设置总背景图 //默认的时白色半透明(有点灰的感觉), UIBarStyleBlack,UIBarStyleBlackTranslucent ,UIBarS ...
- 转:ios导航栏设置
原帖:http://www.cocoachina.com/industry/20131104/7287.html 本文提供的代码需要用Xcode 5来执行.如果你还在使用老版本的Xcode,那么在运行 ...
- iOS状态栏、导航栏的设置
简单的参考 1.状态栏(statusBar) 默认:黑色 改变为白色: 1.1 第一步: info.plist中添加View controller-based status bar appearanc ...
- iOS导航栏的背景颜色设置
方法一: (1) self.navigationController.navigationBar.barStyle = UIBarStyleDefault; self.navigationContro ...
- iOS导航栏背景,标题和返回按钮文字颜色
在iOS7下,默认导航栏背景,颜色是这样的,接下来我们就进行自定义,如果你仅仅是更改一下背景和颜色,代码会很简单,不需要很复杂的自定义View来替代leftBarItem 更改导航栏的背景和文字Col ...
- iOS 导航栏黑线,UIImage 枚举处理方式
ios 找出导航栏下面的黑线(可隐藏,改变样式等) http://www.jianshu.com/p/effa4a48f1e3 设置UIImage的渲染模式:UIImage.renderi ...
- 【Swift】iOS导航栏错乱的原因
#iOS开发高级技巧#导航栏错乱,也就是导航栏的显示效果与内容区不匹配,引发原因很多,其中最重要的有两个原因: 1.在viewwillappear,viewwilldisappear两个函数中,设置导 ...
随机推荐
- jquery: 一些常见的获取
jq1.6+ 勾选checked $(#id).attr("checked", true); 判断checkbox是否选择 $(#id).prop("checked&qu ...
- phalcon:model 事件与事件管理器
事件与事件管理器(Events and Events Manager)¶ Models allow you to implement events that will be thrown when p ...
- 各种U启网启什么的都是浮云
对于支持BIOS的电脑,优盘启动,网络启动的各种方案感觉都是浮云,从硬盘启动PE进行维护才是最可靠的.不点在开发wee的过程中给了我们很多维护的灵感,不用费劲地折腾fbinst/U+/量产/PXE/I ...
- win7下安装MYSQL报错:"MYSQL 服务无法启动"的3534问题
上午在win7下安装MYSQL,只到“net start mysql”这一步报错:3534的错误: 于是在百度中搜索关键字“mysql服务无法启动3534”. 参考以下两个链接中的方法,解决了3534 ...
- mouseover,mouseenter,mouseleave,mouseout
mouseover和mouseout对应 //鼠标移入移出触发该元素及子元素 mouseenter和mouseleave对应 //鼠标移入移出只触发该元素 看完例子即可知道其区别: mouseover ...
- [BI基础] 一些不得不了解的概念
0.Hadoop hadoop主要是用来对海量数据进行存储和计算的. 它本身是一个分布式系统,核心由分布式文件系统hdfs,和分布式计算框架mapreduce组成,在存储和计算时能够发挥出集群中每台机 ...
- (24)odoo中模型标识汇总
* 设置->技术->数据结构->模型 模型 模型描述 类型 瞬态模型account.account 科目 基础对象 ...
- JAVA 多态和异常处理作业——动手动脑以及课后实验性问题
1. 阅读以下代码(CatchWho.java),写出程序运行结果: 1) 源代码 public class CatchWho { public static void main(String[] ...
- java操作数据库出现(][SQLServer 2000 Driver for JDBC]Error establishing socket.)的问题所在即解决办法
在进行jdbc直接操作数据库时 : 我们需要对该工程进行一次导包(引入"msbase.jar" "mssqlserver.jar" "msuti ...
- 数据类型转换的三种方式 Convert,parse和TryParse的解析
以Int类型为例,具体说明Convert.ToInt32(object value),int.Parse(object value)和int.TryParse(string s,out int res ...