快速使用小型大写字母>>

问题描述 投票:0回答:1

如何在Swift 5(Storyboard)/ Xcode 11中使用小型大写字母?

Here's what I'm trying to accomplish.

我想出了如何在SwiftUI中做到这一点:

Text("Typography")
    .font(Font.system(.body).smallCaps())

但是现在不讲故事板应用程序中的方法。

到目前为止,这是我的代码:

labelBrand.font = UIFont.monospacedSystemFont(ofSize: 14, weight: UIFont.Weight.bold)
labelPorsche.font = UIFont.monospacedSystemFont(ofSize: 18, weight: UIFont.Weight.regular)

感谢您的帮助。

如何在Swift 5(Storyboard)/ Xcode 11中使用小型大写字母?这是我要完成的工作。我想出了如何在SwiftUI中做到这一点:Text(“ Typography”).font(Font.system(.body).smallCaps())...

ios swift typography xcode11.4
1个回答
0
投票

关键是为所需的系统字体获取字体描述符

© www.soinside.com 2019 - 2024. All rights reserved.