Home > AI > IOS > SwiftUI >

fixedSize(horizontal:vertical:)

Example 1: allow multiple lines.

Text(title)
    .foregroundColor(.blue)
    .font(.caption)
    .lineSpacing(home.defaultPadding/5)
    .padding(.bottom, home.defaultPadding/5)
    .fixedSize(horizontal: false, vertical: true)

Example 2: prevent GeometryReader extra space

Leave a Reply