简体   繁体   English

视图的颜色和导航栏的颜色

[英]View's color and Navigation Bar's color

I'm having a strange problem, the navigation bar and the view have the same exact UIColor, yet, the navigation bar looks darker! 我遇到一个奇怪的问题,导航栏和视图具有完全相同的UIColor,但是导航栏看起来更暗! Why is that happening? 为什么会这样呢?

Note: I used this line of code in the AppDelegate inside didFinishLaunchingWithOptions function. 注:我用这行代码中AppDelegatedidFinishLaunchingWithOptions功能。

UINavigationBar.appearance().isTranslucent = false

This is common problem. 这是普遍的问题。 You need to set 你需要设置

UINavigationBar.appearance().shadowImage = UIImage()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM