//设置导航栏的标题

self.navigationItem setTitle:@"我的标题";

//设置导航条标题属性:字体大小/字体颜色……

/*设置头的属性:setTitleTextAttributes*/

[self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:19],NSForegroundColorAttributeName:[UIColor whiteColor]}];

//初始化导航条右按钮

/*设置文字与调用方法一个UIBarButtonItem*/

self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"更多成绩" style:UIBarButtonItemStylePlain target:self action:@selector(mustResults)];

//初始化导航条左按钮

/*设置一张图片 与 文字 返回一个UIBarButtonItem*/

self.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithImageName:@"compose_locatebutton_succeeded" title:@"更多成绩" target:self action:@selector(mustResults)];

IOS 设置导航栏的更多相关文章

  1. IOS 设置导航栏全局样式

    // 1.设置导航栏背景 UINavigationBar *bar = [UINavigationBar appearance]; [bar setBackgroundImage:[UIImage r ...

  2. iOS 设置导航栏之二(设置导航栏的颜色、文字的颜色、左边按钮的文字及颜色)

                      #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicati ...

  3. iOS 设置导航栏的颜色和导航栏上文字的颜色

    #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @pr ...

  4. iOS设置导航栏样式(UINavigationController)

    //设置导航栏baritem和返回baiitem样式 UIBarButtonItem *barItem = [UIBarButtonItem appearance]; //去掉返回按钮上的字 [bar ...

  5. iOS 设置导航栏全透明

    - (void)viewWillAppear:(BOOL)animated{ //设置导航栏背景图片为一个空的image,这样就透明了 [self.navigationController.navig ...

  6. ios 设置导航栏背景色

    //设置导航栏背景色 如果上面的不好用 就用下面的 [self.navigationController.navigationBar setBackgroundImage:[UIImage image ...

  7. IOS设置导航栏字体大小及颜色

    方法一: 自定义视图,定义一个lable,相关属性在lable里设置 核心方法: self.navigationItem.titleView = titleLabel; 方法二:用系统方法直接设置 [ ...

  8. iOS设置导航栏标题

    方法一:在UIViewController中设置self.title. 方法二:设置self.navigationItem.titleView.

  9. iOS设置导航栏透明度

    As I support Colin's answer, I want to give you an additional hint to customize the appearance of an ...

随机推荐

  1. django一对多关系的小例题

    urls.py from django.conf.urls import urlfrom django.contrib import adminfrom son1.views import * url ...

  2. thinkphp3.1.3中widget用法

    今天搞了tp3.1的widget,继承了widget类,但是老是掉用错误,所以换种写法,直接继承action TestAction.class.php $this->display();//调用 ...

  3. webp性能测评

    一.测评目的 通过分析webp图片在不同条件下的性能表现,来确定webp图片的适用场景. 二.测评方式 使用控制变量法,分别从以下3点对webp与jpg图片做对比,得出结论. 1.页面图片总体积. 2 ...

  4. SPSS数据分析—加权最小二乘法

    标准的线性回归模型的假设之一是因变量方差齐性,即因变量或残差的方差不随自身预测值或其他自变量的值变化而变化.但是有时候,这种情况会被违反,称为异方差性,比如因变量为储蓄额,自变量为家庭收入,显然高收入 ...

  5. wmic 命令的一个汇总,功能很强大

    获得系统版本信息wmic datafile where Name='c:\\windows\\explorer.exe' get Manufacturer,Version,Filename 获得系统进 ...

  6. About “this” of Javascript

    the 4 point about This: 1.the use of Object methods 2.the use of constructors 3.the use of ordinary ...

  7. git使用和理解之一(不含分支)

    0.前言 Workspace:工作区 Index / Stage:暂存区 Repository:仓库区(或本地仓库) Remote:远程仓库 工作区和暂存区: 我们写代码的地方就是工作区,代码写完后, ...

  8. 坑备忘error: expected class-name before '{' token

    今日重构之前的代码,修改了命名空间,然后一处派生的子类定义处总是总是报error: expected class-name before '{' token,网上查了查原因,出现这种情况大致有两种情况 ...

  9. java selenium (三) 环境搭建 基于Maven

    现在Java的大部分项目都是基于Maven,  在Maven项目中使用Selenium2. 非常简单. 首先你需要配置好Maven的环境 可以参考本博客的Maven教程系列,Maven入门教程(一) ...

  10. EntityFrame Work:No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'

    今天试着学习了Entity Frame Work遇到的问题是 The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlP ...