How to make multiline Text in SwiftUI in watchOS

Issue #482

lineLimit does not seem to work, use fixedSize instead

Fixes this view at its ideal size.

A view that fixes this view at its ideal size in the dimensions given in fixedDimensions.

1
2
3
4
5
6
7
8
9
extension Text {
func styleText() -> some View {
return self
.font(.footnote)
.foregroundColor(.gray)
.lineLimit(10)
.fixedSize(horizontal: false, vertical: true)
}
}

Comments