Q: Max number of lines in a Label?


I have a long title that takes up several lines in a view.

The problem is that sometimes the title is so long that it takes up 4+ lines on the screen and our design is meant for max two lines.

It is possible to limit the number of lines to two for a Label-element?

It would be easy it it were only one line, then we could just disable textWrap.
We also don’t want a fixed height, since it often is only one line of text.


Your post on SO saved me, man!

I really appreciate the Directive you created… you should consider to post it here to help other people.



For anyone searching, it’s this one: https://gist.github.com/m-abs/ff9da8ed6c01c5c5115da37e4b535a2a