我不能將我的RGB顏色設置爲UINavigationBar
和ToolBar。我試了一下如何將自定義(RGB)顏色設置爲導航欄?
let myColor = UIColor(red: 47, green: 206, blue: 255, alpha: 1.0)
self.navigationController?.navigationBar.barTintColor = myColor
self.navigationController?.toolbar.tintColor = myColor
我也試過HSB色彩
let secondColor = UIColor(hue: 194, saturation: 82, brightness: 100, alpha: 1.0)
self.navigationController?.navigationBar.barTintColor = secondColor
self.navigationController?.toolbar.tintColor = secondColor
但是,當我寫了下面的方法,它的工作原理。
self.navigationController?.navigationBar.barTintColor = UIColor.greenColor()
self.navigationController?.toolbar.tintColor = UIColor.greenColor()
如何將我的RGB顏色設置爲條形?