Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

make text autoresize swiftui

struct ContentView : View {
var body: some View {
    ZStack {
        Circle().strokeBorder(Color.red, lineWidth: 30)
        Text("Text")
            .scaledToFill()
            .minimumScaleFactor(0.5)
            .lineLimit(1)
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #text #autoresize #swiftui
ADD COMMENT
Topic
Name
3+2 =