创建UIImagePickerController

  1. // 创建图片选择器
  2. UIImagePickerController *picker = [[UIImagePickerController alloc] init];
  3. picker.sourceType =UIImagePickerControllerSourceTypePhotoLibrary;
  4. picker.allowsEditing = YES;
  5. picker.delegate = self;

//设置导航栏背景颜色

picker.navigationBar.barTintColor = HexRGB(0x4294FE);

//设置右侧取消按钮的字体颜色

picker.navigationBar.tintColor = [UIColor whiteColor]; // 以富文本方式更改[picker.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor], NSFontAttributeName:[UIFont boldSystemFontOfSize:18]}];

  1. [self presentViewController:picker animated:YES completion:nil];

右侧取消按钮的字体方式无效可使用代理方法

  1. - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
  2. {
  3. [viewController.navigationItem.rightBarButtonItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor], NSFontAttributeName:[UIFont systemFontOfSize:]} forState:UIControlStateNormal];
  4.  
  5. [viewController.navigationItem.leftBarButtonItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor], NSFontAttributeName:[UIFont systemFontOfSize:]} forState:UIControlStateNormal];
  6. }

UIImagePickerController导航字体颜色和背景的更多相关文章

  1. delphi DBGrid简单自绘(字体颜色、背景等)

    delphi DBGrid简单自绘(字体颜色.背景等)  从网上找的代码 应该是C#写的,其实delphi 的操作类似: 1 2 3 4 5 6 7 8 9 10 11 12 13 void __fa ...

  2. 使用 JavaScript 中的 document 对象的属性,根据下拉框中选择的属性,更改页面中的字体颜色和背景颜色

    查看本章节 查看作业目录 需求说明: 使用 JavaScript 中的 document 对象的属性,根据下拉框中选择的属性,更改页面中的字体颜色和背景颜色 实现思路: 在页面的 <body&g ...

  3. RadioGroup 的 RadioButton 选择改变字体颜色和背景颜色

    RadioGroup <RadioGroup android:id="@+id/client_charge_radiogroup" android:layout_width= ...

  4. Android 修改Menu字体颜色和背景

    我们知道,在Android中修改TextView的字体颜色,一般是通过setTextColor()方法.虽说Android的Menu菜单项的每一项都是由TextView组成,但是Android的sdk ...

  5. Android RadioGroup的RadioButton 选择改变字体颜色和背景颜色

    RadioGroup <RadioGroup android:id="@+id/client_charge_radiogroup" android:layout_width= ...

  6. 46.UISearchBar的placeholder字体颜色和背景颜色

    1.改变searchbar的searchField属性 UITextField *searchField = [searchbar valueForKey:@"searchField&quo ...

  7. AdvStringGrid 单元格字体颜色、背景颜色

    procedure TForm5.Button1Click(Sender: TObject); var I: Integer; begin AdvStringGrid1.RowCount := ;// ...

  8. JS更改字体颜色、背景颜色

    CSS 颜色十六进制值  http://www.w3school.com.cn/cssref/css_colorsfull.asp CSS background-color 属性 body { bac ...

  9. Android自定义Button字体颜色和背景颜色

    http://blog.csdn.net/breeze666/article/details/7747649

随机推荐

  1. Java线上应用故障之CPU占用高排查与定位

    最近线上频繁报警CPU空闲不足,故紧急排查后分享给大家 1.使用top命令,获取占用CPU最高的进程号 2.查看线程号对应的进程信息 命令:ps -ef|grep 22630 3.查看进程对应的线程信 ...

  2. 012 public等关键字可见性

    public: 具有最大的访问权限,可以访问任何一个在classpath下的类.接口.异常等.它往往用于对外的情况,也就是对象或类对外的一种接口的形式. protected: 主要的作用就是用来保护子 ...

  3. HDU 6187 Destroy Walls (对偶图最小生成树)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6187 题意:有一个V个结点M条边的带边权无向平面图,有一个人在一个区域,要拆一些墙使得他可以到达任意一 ...

  4. php pdo封装类

    class MYPDO { protected static $_instance = null; protected $dbname = ''; protected $dsn; protected ...

  5. CentOS系统yum源配置修改、yum安装软件包源码包出错解决办法apt.sw.be couldn't connect to host

    yum安装包时报错: Could not retrieve mirrorlist http://mirrorlist.repoforge.org/el6/mirrors-rpmforge error  ...

  6. hdu 1849(巴什博弈)

    Rabbit and Grass Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) ...

  7. spring_150908_hibernate_id_sequence

    1.新建java工程:spring_150908_hibernate_id_sequence,添加相关jar包(spring.hibernate.ibatis)如下图所示: 2.实现实体类DogPet ...

  8. ElasticSearch部署文档(Ubuntu 14.04)

    ElasticSearch部署文档(Ubuntu 14.04) 参考链接 https://www.elastic.co/guide/en/elasticsearch/guide/current/hea ...

  9. KVM调整cpu和内存

    一.修改kvm虚拟机的配置 1.virsh edit centos7 找到“memory”和“vcpu”标签,将 <name>centos7</name> <uuid&g ...

  10. SaltStack配置管理--状态间的关系(六)

    一.include的引用 需求场景:用于含有多个SLS的状态,使用include可以进行多个状态的组合,将安装apache,php,mysql集合在一个sls中 [root@7mini-node1 p ...