AppDelegate 的方法 didFinishLaunchingWithOptions 里面写了这段
UINavigationBar.appearance().barTintColor = UIColor(red: 54/255, green: 59/255, blue: 68/255, alpha: 1)
然后在viewController 里面设置view的背景色为
self.view.backgroundColor = UIColor(red: 54/255, green: 59/255, blue: 68/255, alpha: 1)
两者颜色是的RGB值是一致的, 但是启动后, 感觉nav的颜色明显比view的浅,怎么回事?
UINavigationBar.appearance().translucent = false
因为默认navigationBar是半透明的,关闭好了