Nantes
Nantes copied to clipboard
Head truncation drawing is incorrect
Describe the bug
Setting lineBreakMode
to .byTruncatingHead
or .byTruncatingMiddle
causes the label to paint incorrectly. It truncates the head and the tail, or the middle and the tail, and it doesn't paint the correct section of the label (for .byTruncatingHead
).
To Reproduce Steps to reproduce the behavior:
- Run example app
- See truncated head and truncated middle examples
Expected behavior It should paint like UILabel paints. Something like the last line of the string, with the truncation token only appearing at the front of the label, instead of at the front and the end.
Screenshots
Additional context
Potentially changing the truncation code to check against lineBreakMode
before deciding how to truncate might be the fix.