在Storyboard中设置的视图的背景颜色无法正常工作?
问题描述:
奇怪的问题。在Storyboard中设置的视图的背景颜色无法正常工作?
当我从故事板设置背景颜色的UIView,的UILabel或的UIButton它显示如下
但是当我使用像以下的编程设置背景颜色, customView.backgroundColor = //Same colour which I set in storyboard
对于同样的观点,它显示如下:
检查相同RGB值的色差
此外,对于具有相同的色调颜色和零背景图像导航栏它显示像下面
self.navigationBar.setBackgroundImage(nil, for: .default) self.navigationBar.barTintColor = UIColor.nbRedColor()
当我设置半透明属性设置为false,则shwoing作为下面: self.navigationBar.isTranslucent = false
我了解导航栏不同颜色的东西是由于是透明标志。但是为什么从故事板和编程的背景颜色是不同的。
(从编程背景颜色是正确的)
版本的Xcode 8.3.3
你如何让色彩RGB值? –
请分享如何设置RGB颜色 – Jaydip
分享屏幕截图从故事板中的颜色设置 –