【问题标题】:How can i change Navigation Title color, Character spacing & Font style from Storyboard for iOS?如何更改 iOS 版 Storyboard 中的导航标题颜色、字符间距和字体样式?
【发布时间】:2016-10-12 13:20:13
【问题描述】:

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

 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

但我想从情节提要中更改这三个。有什么办法吗?

【问题讨论】:

    标签: ios cocoa-touch storyboard uistoryboard


    【解决方案1】:

    否,无法使用 Storyboard

    【讨论】:

      猜你喜欢
      • 2023-03-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-31
      • 1970-01-01
      • 2018-07-26
      • 2014-07-30
      相关资源
      最近更新 更多