【发布时间】: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