0

I used UiLabel with byTruncatingTail attribute. I want to fix the ellipsis from the middle to the bottom vertically.

It is now stated as follows. is as

But I want to have the ellipsis placed on the floor as follows. to be

My code is as follows.

let paragraphStyle = NSMutableParagraphStyle()
let range = NSRange(location: 0, length: mutableAttributedString.length)
paragraphStyle.lineSpacing = 2
paragraphStyle.alignment = .center
paragraphStyle.lineBreakMode = .byTruncatingTail
mutableAttributedString.addAttribute(.paragraphStyle, value: paragraphStyle, range: range)
titleLabel.attributedText = mutableAttributedString

Is this possible?

Dávid Pásztor
  • 51,403
  • 9
  • 85
  • 116
hey
  • 1
  • 1
  • You need to [edit] your question to include all relevant code in the form of a [mcve] in order to make the question on-topic. – Dávid Pásztor Jul 27 '22 at 10:28
  • https://stackoverflow.com/questions/39643542/setting-vertical-align-of-truncated-tails-for-nsattributedstring-with-nstextatta – Vikas saini Jul 27 '22 at 11:32

0 Answers0