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 导航栏属性设置的更多相关文章

  1. IOS导航栏颜色渐变与常用属性

    (转:http://www.cnblogs.com/Lingchen-start/archive/2015/10/23/4904361.html) 今年很忙,忙的写日志的时间都很少.  少的可怜. 自 ...

  2. iOS - 导航栏UINavigationController经常使用属性

    1.设置导航栏标题 self.title = @"dylan_李伟宾"; 2.设置导航栏样式 设置方法: [self.navigationController.navigation ...

  3. 导航栏视图设置 tabbleView 是设置总背景图

    //导航栏视图设置 tabbleView 是设置总背景图 //默认的时白色半透明(有点灰的感觉), UIBarStyleBlack,UIBarStyleBlackTranslucent ,UIBarS ...

  4. 转:ios导航栏设置

    原帖:http://www.cocoachina.com/industry/20131104/7287.html 本文提供的代码需要用Xcode 5来执行.如果你还在使用老版本的Xcode,那么在运行 ...

  5. iOS状态栏、导航栏的设置

    简单的参考 1.状态栏(statusBar) 默认:黑色 改变为白色: 1.1 第一步: info.plist中添加View controller-based status bar appearanc ...

  6. iOS导航栏的背景颜色设置

    方法一: (1) self.navigationController.navigationBar.barStyle = UIBarStyleDefault; self.navigationContro ...

  7. iOS导航栏背景,标题和返回按钮文字颜色

    在iOS7下,默认导航栏背景,颜色是这样的,接下来我们就进行自定义,如果你仅仅是更改一下背景和颜色,代码会很简单,不需要很复杂的自定义View来替代leftBarItem 更改导航栏的背景和文字Col ...

  8. iOS 导航栏黑线,UIImage 枚举处理方式

      ios 找出导航栏下面的黑线(可隐藏,改变样式等) http://www.jianshu.com/p/effa4a48f1e3     设置UIImage的渲染模式:UIImage.renderi ...

  9. 【Swift】iOS导航栏错乱的原因

    #iOS开发高级技巧#导航栏错乱,也就是导航栏的显示效果与内容区不匹配,引发原因很多,其中最重要的有两个原因: 1.在viewwillappear,viewwilldisappear两个函数中,设置导 ...

随机推荐

  1. DIY_hlstudio_WIN7PE【69M】网络版【89M】

    DIY_hlstudio_WIN7PE[69M]网络版[89M] hlstudio的骨头版PE非常精简,由于启动方式和用法不同,个人进行了如下修改:1.原来的合盘修改为bootmgr直接起动ISO镜像 ...

  2. Windows CPU占用率过高

    今天调试程序,发现Windows7的CPU占用率一直为25%左右,如下图所示.四核25%,换成单核那就是100%的占用率了! 上图进入"进程"页面,单击"CPU" ...

  3. kubernetes容器编排系统介绍

    版权声明:本文由turboxu原创文章,转载请注明出处: 文章原文链接:https://www.qcloud.com/community/article/152 来源:腾云阁 https://www. ...

  4. window2012 64bit 安装sqlserver2012 64bit调用excel的驱动安装

    如果电脑已经安装了32bit的office那么可以使用 管理员权限打开cmd,然会执行以下命令 AccessDatabaseEngine_X64.exe /passive

  5. 3.3 使用Code First数据库迁移

    当Entity Framework Code First的数据模型发生异动时,默认会引发一个System.InvalidOpertaionException异常.一种解决方法是在Global.asax ...

  6. Qt之findChild

    简述 在Qt编程过程中,通常会有多个部件嵌套,而大多数部件都有父子依赖关系,但是有些情况下不能直接引用子部件,这时我们可以通过父部件来findChild -"查找孩子". 简述 查 ...

  7. java编程思想

    Java编程思想,Java学习必读经典,不管是初学者还是大牛都值得一读,这里总结书中的重点知识,这些知识不仅经常出现在各大知名公司的笔试面试过程中,而且在大型项目开发中也是常用的知识,既有简单的概念理 ...

  8. 课堂练习&课下作业

    设计思路: 列举出买十本的所有情况:1.一本的时候不打折扣 2.两本的时候买两本价最低 3.三本的时候买三本价最低 4.四本的时候买四本价最低 5.五本的时候买五本价最低 6.六本的时候分一本和五本价 ...

  9. 216. Combination Sum III——本质DFS

    Find all possible combinations of k numbers that add up to a number n, given that only numbers from ...

  10. JavaScript EventLoop

    转自:http://cek.io/blog/2015/12/03/event-loop/ What is JavaScript What is JavaScript anyway? Some word ...