UINavigationBar背景颜色不是我设置的确切UIColor [英] UINavigationBar background color not the exact UIColor I set it to

查看:170
本文介绍了UINavigationBar背景颜色不是我设置的确切UIColor的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请查看下面的截图。

我为UINavigationBar,底部的搜索栏和工具栏设置了相同UIColor对象的所有色调颜色。但由于某种原因,导航栏颜色略有不同。可能是什么原因?

I set all the tint colors from the same UIColor object for the UINavigationBar, search bar and toolbar at the bottom. But for some reason the navigationbar color is slightly different. What could be the reason for this?

谢谢..

推荐答案

导航栏之间的差异和搜索栏是因为导航栏是半透明的,该系统将申请的导航栏默认alpha值。

The difference between your navigation bar and search bar is because the navigation bar is translucent,the system will apply a default alpha value for the navigation bar.

尝试 self.navigationController.navigationBar .translucent = NO;

这篇关于UINavigationBar背景颜色不是我设置的确切UIColor的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆