How to check if Label is truncated in Xamarin iOS?

Cuong 1 Reputation point
2021-09-28T04:58:08.503+00:00

Hello,
In my app, Label will usually be quite long, so I have set Maxlines to 5 and Linebreakmode to TailTruncate, resulting in the end of Label there will be "...". However, I still want to add the text "Read more" below this Label, so I need to know when the Label is truncated to show the "Read more" text (otherwise I will hide it).
I did it on Android by using the "GetEllipsisCount" method for the last line.
I hope you can help me make it for iOS.
P/S: sorry about my English.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,293 questions
{count} votes