Home > Back-end >  How can I implement SF Pro Rounded text in Swift?
How can I implement SF Pro Rounded text in Swift?

Time:08-09

Below is the code on which I am trying to implement SF pro-rounded text in Swift. I am new to Swift and am not entirely sure how to edit fonts. Text("Levitate") .font(.largeTitle) .fontWeight(.semibold) .foregroundColor(Color.white) .multilineTextAlignment(.center)

CodePudding user response:

You want this: https://developer.apple.com/documentation/swiftui/font/system(_:design:weight:)

E.g.:

Text("My text")
    .font(.system(.largeTitle, design: .rounded, weight: .semibold))
  • Related