- (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. vue2.0入门

    vue2.0 开发实践总结之入门篇   vue2.0 据说也出了很久了,博主终于操了一次实刀. 整体项目采用  vue +  vue-router +  vuex (传说中的vue 全家桶 ),构建工 ...

  2. iOS开发之—— XCODE真机调试设备连接一直忙碌如何处理!(真机调试各种错误提示解决)

    真机调试,想连接真机调试代码可是连上设备后就一直转圈, 在Divice里面一直提示“iphone名称” is busy: Processing symbol files Xcode will cont ...

  3. aptana studio 3汉化方法 及支持jquery的方法

    之前看弦哥的 Asp.Net大型项目实践系列第二季(一)哥欲善其事,必先利其器 看到他介绍了aptana,好像用来学习js是个好工具... 因为不论你写什么,都会提示你它在各个浏览器中是否被支持... ...

  4. GDB代码调试与使用

    GDB代码调试与使用 Linux下GDB调试代码 源代码 编译生成执行文件 gcc -g test.c -o test 使用GDB调试 启动GDB:gdb test 从第一行列出源代码:list 直接 ...

  5. Operators一句话介绍(RxJava版)

    Cold Observables 在第一个subscriber订阅后才执行事件发送的Observables,默认普通Observables都是这个类型 Cold Observables对于每个订阅的s ...

  6. 第八章 self sizing cell

    本项目是<beginning iOS8 programming with swift>中的项目学习笔记==>全部笔记目录 ------------------------------ ...

  7. Android实现两个ScrollView互相联动,同步滚动的效果

    公众号:smart_android 作者:loonggg 点击"阅读原文",可查看更多内容和干货 最近在做一个项目,用到了两个ScrollView互相联动的效果,简单来说联动效果意 ...

  8. [AaronYang]C#人爱学不学[7]

    做一个决定,并不难,难的是付诸行动,并且坚持到底 --Aaronyang的博客(www.ayjs.net)-www.8mi.me 1. 委托-我的总结 1.1 委托:面试我都会说,把方法当参数.委托包 ...

  9. angularJS中-$route路由-$http(ajax)的使用

    后台请求使用的是nodeJS驱动(后面帖代码),很简单的RESTFUL, 页面使用的是bottstarp3.0(懒人神器); 第一个例子: 在本地架设NODEJS, angular的所有请求都是请求本 ...

  10. 【前端开发系列】—— CSS3属性选择器总结

    想想自己为什么要学CSS,作为一个开发过前端的人员来说,调试一个图片花了半天的时间,最后发现分隔符用错了,实在是一件很丢人的事情.因此,痛下决心来学习CSS,最近一周也会更新下相关的学习笔记. CSS ...