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两个函数中,设置导 ...
随机推荐
- centos7 安装mariaDB 以及 phpmyadmin的安装
centos7 安装mariaDB 以及 phpmyadmin的安装 一:安装mariadb, mariadb 是 mysql 的一个分支,基本和mysql一样的 1. yum -y install ...
- css读书笔记2:css工作原理
css就是一种先选择html元素,然后设定选中元素css属性的机制.css选择符合要应用的样式构成一条css规则. 为文档添加样式的3种方法: 1.行内样式,直接写在特定标签的style属性中:2.嵌 ...
- NOIP 2014 普及组 T3 螺旋矩阵
[题意] 已知:n,r,c(n<=30000) 条件:给定n行n列的螺旋矩阵(从矩阵的左上角(1,1)出发,初始时向右移动:如果前方是未曾经过的格子, 则继续前进,否则右转:重复上述操作直至经过 ...
- TWaver HTML5 (2D)--基本概念
基本概念 TWaver HTML5(以下简称TWaver)使用HTML5技术和javascript语言,可在支持HTML5的浏览器上进行绘图. 使用TWaver前,需熟悉几个基本概念:图元(Eleme ...
- grouping sets,cube,rollup,grouping__id,group by
例1: hive -e" select type ,status ,count(1) from usr_info where pt='2015-09-14' group by type,st ...
- wiki-editor语法
1.==标题== 2.::换行缩进 3.[[文件:example.png]] 图片 4.** 名字|名字 链接
- C线程同步/异步
#include<windows.h> #include<stdio.h> #include<string.h> //#include <afxmt.h> ...
- ARM汇编中的标号
标号(LABEL)是为一组机器指令所起名字,表示程序中的指令或者数据地址的符号.标号可有可无,只有当需要用符号地址来访问该语句时,才给此语句赋予标号.通过在目标地址的前面放上一个标号,可以在指令中使用 ...
- Spring Data Jpa配置
Spring Data JPA提供的接口,也是Spring Data JPA的核心概念: 1:Repository:最顶层的接口,是一个空的接口,目的是为了统一所有Repository的类型,且能让组 ...
- webform工程中aspx页面为何不能调用appcode文件夹下的类(ASP.NET特殊文件夹的用法)
App_code 只有website类型的工程才有效. App_Code 下创建的.cs文件仅仅是“内容”不是代码.你设置那个文件为“编译”就行了. 其他特殊文件夹 1. Bin文件夹 Bin文件夹包 ...