我试图在 SwiftUI 中将我的文本更改为小型大写字母。但我不明白如何将方法应用于我的文本。
https://developer.apple.com/documentation/swiftui/font/3084273-smallcaps
我尝试了不同的方法,这里有两种:
Text("Typography")
.font(.system(size: 24))
.fontWeight(.bold)
.smallCaps()
-
Text("Typography")
.font(.system(.body, textStyle: .smallCaps))
如何将我的字母设置为小型大写字母?我正在使用 Xcode 11.3。
谢谢!