ios8 / xcode6.1:在storyboard中设置时,在运行时忽略自定义字体

时间:2015-01-20 02:54:09

标签: ios swift fonts xcode-storyboard

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

不幸的是,当我在故事板模式下设置时,归因于textviews以及标签或按钮会忽略我的字体!

如果我以编程方式生成某些内容,则可以正常工作,例如像这样:

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"而不是"归因于"暂时解决问题

1 个答案:

答案 0 :(得分:1)

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