标签:
self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.whiteColor()]
原来的UITextAttributeTextColor iOS 7 已经弃用了
用新的NSForegroundColorAttributeName
再附上一个自己写的 16进制转UIColor的函数
func createUIColorFrom(#hex: Int) -> UIColor { let r = (hex & 0xff0000) >> 16 let g = (hex & 0x00ff00) >> 8 let b = hex & 0x0000ff return UIColor(red: CGFloat(r)/255, green: CGFloat(g)/255, blue: CGFloat(b)/255, alpha: 1) }
[UIDesign] NavigationBar Title 颜色改变
标签:
原文地址:http://www.cnblogs.com/baaingSheep/p/4749174.html