如何更改导航标题颜色,字符间距和& Storyboard for iOS的字体样式?

时间:2016-06-11 18:56:05

标签: ios cocoa-touch storyboard uistoryboard

我可以更改字符间距,标题颜色和&字体样式以编程方式。这是示例代码

 let titleLabel = UILabel()
let colour = UIColor.redColor()
let attributes: [NSString : AnyObject] = [NSFontAttributeName: UIFont.systemFontOfSize(12), NSForegroundColorAttributeName: colour, NSKernAttributeName : 5.0]
titleLabel.attributedText = NSAttributedString(string: "My String", attributes: attributes)
titleLabel.sizeToFit()
self.navigationItem.titleView = titleLabel

但我想从故事板中改变这三个。有什么办法吗?

1 个答案:

答案 0 :(得分:0)

,使用Storyboard

无法实现