0
我可以以编程方式更改字符间距,标题颜色&字体样式。这里是示例代码如何从iOS的Storyboard更改导航标题颜色,字符间距和字体样式?
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
但我想改变这三个故事板。有没有可能的方法?