SwiftUI: How-to append view to ending of multiline text?
Current I have something like the following: Short text with badge: It's done simple with HStack atm: HStack { Text("Lorem ipsum dolor sit amet.") .font(.title2) Text("foo") .font(.system(size: 14, weight: .bold)) .foregroundColor(.white) .padding(.horizontal, 4) .padding(.vertical, 2) .background(Color.red) .cornerRadius(5) } My Problem is that the main text is multiline and if it wraps, it looks like this: Larger multiline text with badge: Goal But my goal is that the foo badge is always displayed after the last word of the main text, which should look like this: Goal: Solution like Text + T
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.