- (void)setRightBarButtonItem
{
// Create done Button
UIBarButtonItem *doneButton = [[UIBarButtonItem alloc]initWithTitle:[NSString stringWithFormat:@"确定(%lu/%lu)", (unsigned long)self.selectedAssetURLs.count, (unsigned long)self.maximumNumberOfSelection] style:UIBarButtonItemStylePlain target:self action:@selector(done:)]; [self.navigationItem setRightBarButtonItem:doneButton animated:YES]; UIColor *color = [UIColor colorWithHexString:@"#fe5346"];
CGRect frame = CGRectMake(, , SCREEN_WIDTH, );
UIImage *image = [UIImage imageWithColor:color withFrame:frame];
[self.navigationController.navigationBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];
self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
self.navigationController.navigationBar.barTintColor = [UIColor whiteColor];
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor whiteColor]}; }
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
/**
* @author SongXing, 15-07-30 14:07:45
*
* UIIMagePickerController颜色修正
*
*/
if ([navigationController isKindOfClass:[UIImagePickerController class]] &&
((UIImagePickerController *)navigationController).sourceType == UIImagePickerControllerSourceTypePhotoLibrary) {
[[UIApplication sharedApplication] setStatusBarHidden:NO];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];
} if (navigationController.viewControllers.count != ) return; CGFloat screenHeight = [[UIScreen mainScreen] bounds].size.height; UIView *plCropOverlay = [viewController.view.subviews[] subviews][]; plCropOverlay.hidden = YES; int position = ; position = (screenHeight == ) ? : ; CAShapeLayer *circleLayer = [CAShapeLayer layer]; UIBezierPath *path2 = [UIBezierPath bezierPathWithOvalInRect:
CGRectMake(0.0f, position, SCREEN_WIDTH, 320.0f)];
[path2 setUsesEvenOddFillRule:YES]; [circleLayer setPath:[path2 CGPath]]; [circleLayer setFillColor:[[UIColor clearColor] CGColor]];
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(, , SCREEN_WIDTH, screenHeight-) cornerRadius:]; [path appendPath:path2];
[path setUsesEvenOddFillRule:YES]; CAShapeLayer *fillLayer = [CAShapeLayer layer];
fillLayer.path = path.CGPath;
fillLayer.fillRule = kCAFillRuleEvenOdd;
fillLayer.fillColor = [UIColor clearColor].CGColor;
fillLayer.opacity = 0.8;
[viewController.view.layer addSublayer:fillLayer]; }

iOS系统navigationBar背景色,文字颜色处理的更多相关文章

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

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

  2. 解决win10系统dpi放大后,部分网页文字颜色很浅的问题

    前段时间,换了个27寸的4k显示器.原始分辨率下文字太小,眼睛估计得看瞎 放大dpi后,这问题,那问题,好多 百度知道,淘宝,这网页文字颜色也非常的浅,看着眼睛很累人 看了半天是字体若的祸 暂时发现A ...

  3. android TextView 设置部分文字背景色和文字颜色

    通过SpannableStringBuilder来实现,它就像html里边的元素改变指定文字的文字颜色或背景色 public class MainActivity extends Activity { ...

  4. android TextView 设置部分文字背景色 和 文字颜色

    通过SpannableStringBuilder来实现,它就像html里边的元素改变指定文字的文字颜色或背景色 ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...

  5. 修改Tooltip 文字提示 的背景色 箭头颜色

    3==>vue 鼠标右击<div @contextmenu.prevent="mouseRightClick">prevent是阻止鼠标的默认事件 4==> ...

  6. 【Winform-GataGridView】根据DataGridView中的数据内容设置行的文字颜色、背景色 — 根据状态变色

    C#中可以根据每行内容的不同来对DataGridView数据表格控制每行的文字颜色.背景颜色进行不同的设置. 效果如下: 实现: 在DataGridView的RowPrePaint事件中进行行颜色控制 ...

  7. iOS不得姐项目--登录模块的布局,设置文本框占位文字颜色,自定义内部控件竖直排列的按钮

    一.登录模块的布局 将一整部分切割成若干部分来完成,如图分成了三部分来完成 设置顶部状态栏为白色的方法 二.设置文本框占位文字颜色 <1>方法一与方法二实现原理是同一种,都是通过设置pla ...

  8. iOS tableview 选中Cell后的背景颜色和文字颜色

    做下记录,备忘 改文字颜色其实是UILabel的属性,改背景颜色是cell的属性,都和tableview无关. cell.textLabel.textColor = BAR_COLOR; cell.t ...

  9. iOS开发,更改状态栏(StatusBar)文字颜色为白色

    详细实现步骤 1.如图在Info.plist中进行设置,主要用于处理启动画面中状态栏(StatusBar)文字颜色. watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5u ...

随机推荐

  1. [tools]google神器浏览器下载

    google神器下载 这是一款优化了的google浏览器 http://www.ccav1.me/chromegae.html

  2. gunzip 和 unzip 解压文件到指定的目录

    Linux 常用的压缩命令有 gzip 和 zip,两种压缩包的结尾不同:zip 压缩的后文件是 *.zip ,而 gzip 压缩后的文件 *.gz  相应的解压缩命令则是 gunzip 和 unzi ...

  3. Andorid-15k+的面试题。

    andorid开发也做了3年有余了,也面试很多加企业,借此机会分享一下,我们中遇到过的问题以及解决方案吧,希望能够对正在找工作的andoird程序员有一定的帮助. 特别献上整理过的50道面试题目 1. ...

  4. Opencv Linux环境搭建(2)

    继上次ubuntu10.04搭建失败之后,这次又换了一个系统. 拿出之前闲置的笔记本,安装了ubuntu12.04,按照这里的教程开始搞起来: http://www.linuxidc.com/Linu ...

  5. 《Java程序设计》课程总结

    课程总结 每周读书笔记链接汇总 第一周读书笔记 第二周读书笔记 第三周读书笔记 第四周读书笔记 第五周读书笔记 第六周读书笔记 第七周读书笔记 第八周读书笔记 第九周读书笔记 第十周读书笔记 实验报告 ...

  6. 20145316GDB调试汇编堆栈

    GDB调试例子的汇编堆栈 代码 直接-m32编译出现问题 编译64位Linux版本32位的二进制文件,需要安装一个库,使用指令sudo apt-get install libc6-dev-i386 编 ...

  7. 我的权限系统设计实现MVC4 + WebAPI + EasyUI + Knockout(三)图形化机构树

    一.前言 组织机构是国内管理系统中很重要的一个概念,以前我们基本都是采用数据列表的形式展现,最多只是采用树形列表展现.虽然够用,但是如果能做成图形化当然是最好不过了.这里我不用任何图形控件,就用最原始 ...

  8. C# GC 垃圾回收机制

    今天来谈谈C# 的GC ,也就是垃圾回收机制,非常的受教,总结如下 首先:谈谈托管,什么叫托管,我的理解就是托付C# 运行环境帮我们去管理,在这个运行环境中可以帮助我们开辟内存和释放内存,开辟内存一般 ...

  9. java之运算符

    package com.simope.myTest; import java.util.HashMap; import java.util.Iterator; import java.util.Map ...

  10. Highcharts candlestick(K线图)案例

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...