iOS8/Xcode6.1:在Storyboard中设置的自定义字体在运行时被忽略

4
我已经将一种普通字体和一种加粗字体的2个*.ttf文件导入Xcode,并在.plist文件中设置了所有内容。现在我可以在storyboard中完美地查看这些字体。
不幸的是,当我在storyboard模式下设置属性文本视图、标签或按钮的字体时,它们会忽略我的字体!
如果我通过编程方式生成文本,则可以正常工作,例如:
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”可以暂时解决问题。
1个回答

1

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接