0

I have a UILabel with an attributed string, where the content text is e.g. "abcdefghijklmnopqrstuvwxyz", and and the numberOfLines property is 2. For this scenario the label displays as follows (truncating the tail of the string):

abcdefghijkl

mnopqrstu...

Is there a way to request displayed "abcdefghijklmnopqrstu..." string instead of the whole original one? The content is mixed with English, Chinese, emoji, etc...

The Dreams Wind
  • 8,416
  • 2
  • 19
  • 49
Mix
  • 459
  • 1
  • 7
  • 20
  • 1
    What do you mean by "the whole original one"? What exactly do you get? – Arik Segal Jan 12 '23 at 12:16
  • may be these would be helpful: https://stackoverflow.com/questions/24034174/how-do-i-concatenate-strings-in-swift, https://stackoverflow.com/questions/31224293/how-to-concate-two-nsattributed-string-in-swift, https://stackoverflow.com/questions/24091233/swift-split-string-over-multiple-lines, https://stackoverflow.com/questions/27083445/how-to-join-two-string-with-a-new-line-between-them – SwiftNewbie Jan 12 '23 at 12:35

0 Answers0