Posts

Post not yet marked as solved
2 Replies
i came here looking for the answer to the same question, and was disappointed to see no replies. however, it occurred to me to try something which turned out to work, at least in my case: try setting the frame max-height of the text to infinity, e.g.:Text("your really long bit of text that was truncating instead of wrapping, etc.") .lineLimit(nil) .frame(maxHeight: .infinity)hope it works for you too![ later edit: although this technique does prevent truncation, it also can sometimes inexplicably make what should be a single line of text be displayed with an excessive amount of vertical padding. i've noticed this primarily with japanese text, although i doubt there's a connection. no workaround as yet ... ][ still later ... turns out you can sort of work around the issue by wrapping your text in, say, a vstack, and putting the frame modifier on that, e.g.:VStack(alignment: .leading, spacing: 0.0) { Text(name) PlaceCartouche(addr, size: 14.0) } .frame(maxHeight: .infinity)in my code, the text inside the placecartouche container was having the wrapping problem. applying the frame modifier to the styled text inside that container behaved oddly, but the additional level of abstraction seems to fix it ... ]