Reputation: 552
I have this in a View:
List {
GeometryReader { geo in
Text("\(name)")
.fixedSize(horizontal: false, vertical: true)
.lineLimit(nil)
.frame(width: geo.size.width, height: .infinity)
.font(.system(size: 26))
.fontWeight(.bold)
//.font(.title)
//.multilineTextAlignment(.center)
}
}
How can I make all text visible while maintaining font size?
Upvotes: 1
Views: 1175
Reputation:
Add the List in the Geometryreader and update width to .infinity
GeometryReader { geo in
List {
Text("name")
.font(.system(size: 28))
.fontWeight(.bold)
.frame(width:.infinity, height: .infinity)
.fixedSize(horizontal: false, vertical: true)
}
}
now with this code your text should be expanded vertically
Upvotes: 4