0
で設定した色は、私は次のサブクラスを持っている:UINavigationBar:サブクラス
class GeneralNavigationBar: UINavigationBar {
override func layoutSubviews() {
super.layoutSubviews()
self.barTintColor = UIColor(rgb: 0x2A5298) //Extension that converts hex to color
self.tintColor = UIColor.white
}
}
私はバーのタイトルは白になりたいです。このクラスをストーリーボードのNavigationBarに適用すると、背景は青色になります(16進数)。しかしタイトルは黒色のままです。この作品
self.navigationController?.navigationBar.barTintColor = UIColor(red: 204/255, green: 47/255, blue: 40/255, alpha: 1.0)
self.navigationController?.navigationBar.tintColor = UIColor.whiteColor()
:あなたはそれがに表示されますのViewControllerでバーの色を変えることができるので
それは、奇妙です。