UINavigationBar Tint Color与IOS中其他应用程序之间的色差

时间:2016-07-25 18:00:36

标签: ios swift uinavigationbar uicolor bartintcolor

这是我在Sketch中的设计:

enter image description here

草图说蓝色是70,164,239。

所以我的标签有以下代码:

UINavigationBar.appearance().barTintColor = UIColor(red: 70.0/255.0, green: 164.0/255.0, blue: 239.0/255.0, alpha: 1.0)
UINavigationBar.appearance().tintColor = UIColor.clearColor()
UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName : UIColor.whiteColor()]

以下视图(在动作中):

self.two_buttons_view.backgroundColor = UIColor(red: 70.0/255.0, green: 164.0/255.0, blue: 239.0/255.0, alpha: 1.0)

但是看看发生了什么,导航栏颜色总是比视图的颜色轻一点。这种淡蓝色只有轻微的区别,但如果我选择深蓝色则会更加明显。导航栏的颜色似乎永远不会像其他页面视图那样丰富:

enter image description here

1 个答案:

答案 0 :(得分:26)

translucent色调颜色。它结合了酒吧的半透明(是一个单词?),以及酒吧后面的内容,给出了其他一些颜色。

如果您想完全控制导航栏的实际颜色,请将其false设置为Range("C13").Select Range(Selection, Selection.End(xlDown)).Select x1 = Selection.End(xlDown).Select MsgBox (x1) ,然后为其提供背景图片由所需颜色的矩形组成 - no 色调。