I have Name Max
and text. I would like the text to be right after line truncation on the left side (without having whitespace). Is such a thing possible in SwiftUI?
Photo:
The code I am currently using is this:
struct NotificationUser: View {
var name: String
var text: String
var body: some View {
HStack(alignment: .top) {
Text(name)
.bold()
.padding(.horizontal, 5)
.padding(.vertical, 2)
.background(Color(.systemGray6))
.cornerRadius(5)
Text(text)
}
}
}