On some devices (like iPhone 8+ and iPhone 11 Pro Max) my text inside a Text element is getting trimmed even if there is enough space left. I have placed my Text like this:
But even a small text like "00000000" is getting trimmed way too early. What makes me wonder is, that the very same text works fine on a smaller device like the iPhone 11 or SE. For me it looks like that the Spacer take way more space as it should. So whats wrong here?
Code Block HStack { Spacer() Text(result.number) .font(.headline) .foregroundColor(Color.white) .padding(12) .frame(maxWidth: .infinity) Spacer() }
But even a small text like "00000000" is getting trimmed way too early. What makes me wonder is, that the very same text works fine on a smaller device like the iPhone 11 or SE. For me it looks like that the Spacer take way more space as it should. So whats wrong here?