【发布时间】:2021-06-02 22:58:13
【问题描述】:
UILabel 上的动态字体是怎么来的,我们有以下内容:
artistLabel.font = UIFont.preferredFont(forTextStyle: .body, compatibleWith: UITraitCollection(legibilityWeight: .regular))
artistLabel.adjustsFontForContentSizeCategory = true
trackLabel.font = UIFont.preferredFont(forTextStyle: .body, compatibleWith: UITraitCollection(legibilityWeight: .bold))
trackLabel.adjustsFontForContentSizeCategory = true
粗体和常规看起来一样吗?如何获得真正的“粗体”字体?
【问题讨论】:
标签: swift accessibility dynamic-type-feature