我可以更改字符间距,标题颜色和&字体样式以编程方式。这是示例代码
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
但我想从故事板中改变这三个。有什么办法吗?
答案 0 :(得分:0)
否,使用Storyboard
无法实现