Is there something similar like css text ellipsis or iOS NSLineBreakByTruncatingTail (after iOS 7.x) to display 3 points if the text is too long?
Ok, this is working by default on iOS 9.x with non wrapping texts. Is there a way to do it with wrapping text?
Unfortunately, this is exactly what the difference between TextWrapping=NoWrap
and TextWrapping=Wrap
is. When TextWrapping
is NoWrap
, we set the lineBreakMode
to NSLineBreakByTruncatingTail
. And when TextWrapping
is Wrap
, we set the lineBreakMode
to NSLineBreakByWordWrapping
. There is no setting in the iOS TextKit APIs to do both word-wrap and truncate.
That being said, we have plans to rewrite the iOS text renderer to use CoreText instead of TextKit, and that might change the situation.