【问题标题】:ios8/xcode6.1: custom font ignored at runtime when set in storyboardios8/xcode6.1:在情节提要中设置时在运行时忽略自定义字体
【发布时间】:2015-01-20 02:54:09
【问题描述】:

我将 2 个 *.ttf 字体文件作为普通和粗体字体导入 xcode,在 .plist 等中设置所有内容 - 我现在可以在故事板中完美地查看字体。

不幸的是,当我在情节提要模式下设置它时,属性文本视图以及标签或按钮将忽略我的字体!

如果我以编程方式生成某些东西,它可以正常工作,例如像这样:

var testButton = UIButton()
testButton.setTitle("Abbrechen", forState: UIControlState.Normal)
testButton.backgroundColor = UIColor.blueColor()
testButton.titleLabel?.font = UIFont(name: "FaktConPro-Bold", size: 37)
testButton.tintColor = UIColor.redColor()
testButton.frame = CGRectMake(0 , 0, self.view.frame.width, 60)

view.addSubview(testButton)

有什么提示吗? iOS 喜欢任何格式吗?

€dit:将标签和文本字段设置为“plain”而不是“attributed”暂时解决了问题

【问题讨论】:

    标签: ios swift fonts xcode-storyboard


    【解决方案1】:

    这是 Xcode 上的一个错误。几个月前我已经创建了一个雷达。这里:http://openradar.appspot.com/radar?id=5117089870249984

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-11-16
      • 2019-10-23
      • 2015-05-04
      • 2015-09-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多