I am trying to add text in Xcode and use a font variant (like one of the new ones added in ios 16 i think). How do I use the SF Pro expanded variant?
How do I use the SF Pro expanded variant?
I tried this but it didn't work:
Text("title thing").font(.system(size: 34, weight: .bold, width: .expanded))
Same. I have no idea how to use SF Pro Font Variants in Swift. Tried the same thing you did
-Developer Zaza
[Personal Information Edited by Moderator]
You can do it like this.
Text("Text")
.font(.system(size: 28, weight: .black))
.fontWidth(.expanded)
Text("Text")
.font(.title.weight(.black).width(.expanded))