【发布时间】:2020-03-12 20:30:36
【问题描述】:
我的 Storyboard 中有几个视图,它们有 UILabels。这些标签设置为Automatically Adjusts Font,并使用Body 或Headline 等文本样式。
我知道有这样一种程序化方法: https://useyourloaf.com/blog/using-a-custom-font-with-dynamic-type/
let label = UILabel()
label.font = scaledFont.font(forTextStyle: textStyle)
label.adjustsFontForContentSizeCategory = true
但是,鉴于我已经布置了标签并设置了它们的文本样式,有没有办法在界面生成器中使用自定义字体 AND 文本样式?或者可能以某种方式覆盖他们的字体系列,同时尊重他们已经设置的文本样式?
【问题讨论】:
标签: swift xcode interface-builder