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. sccm部署win7原版系统系统盘为D盘

    1. 系统部署完毕之后是这样的

  2. Implicit Object in JSP

    Implicit Object Description request The HttpServletRequest object associated with the request. respo ...

  3. python 练习 20

    #!/usr/bin/python # -*- coding: UTF-8 -*- from sys import stdout n = int(raw_input("input numbe ...

  4. Redis与Java - 数据结构

    Redis与Java 标签 : Java与NoSQL Redis(REmote DIctionary Server) is an open source (BSD licensed), in-memo ...

  5. 有关Rander生成随机数的问题

    首先我们说的是要生成一个随机数要求传入两个参数.一个表示生成的个数,另外一个表示生成的长度 . public void shengchengsuijishu(int lenght) { '}; Ran ...

  6. 5. Longest Palindromic Substring -- 最长回文字串

    Given a string S, find the longest palindromic substring in S. You may assume that the maximum lengt ...

  7. Hadoop常见错误及处理方法

    1.Hadoop-root-datanode-master.log 中有如下错误: ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: jav ...

  8. F-Dining Cows(POJ 3671)

    Dining Cows Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7584   Accepted: 3201 Descr ...

  9. linux apache 自动监护脚本

    1 首先安装curl yum install curl 2 编写shell vi restart_apache.sh 写入一下内容 #!/bin/bashURL="http://127.0. ...

  10. struts2 拦截器 interceptor

    struts2 拦截器详解:http://struts2.group.iteye.com/group/wiki/1397-deep-into-struts2-interceptors