Home > AI > IOS > SwiftUI >

add a rounded empty background of text

Text(shortname)
   .foregroundColor(.blue)
   .padding(.horizontal, home.defaultPadding/1.5)
   .padding(.vertical, home.defaultPadding/8)
   .background(RoundedRectangle(cornerRadius: home.cornerRadius/2)
   .stroke(Color.blue, lineWidth: home.borderWidth))

Leave a Reply