Search code examples
iphoneobjective-cioscocoa-touchnsattributedstring

How can I line break OHAttributedLabel


How can I line break OHAttributedLabel? My below code didn't work.

OHAttributedLabel *lbl = [[OHAttributedLabel alloc] init];
lbl.lineBreakMode = UILineBreakModeTailTruncation;

Solution

  • Appending a standard line break (\n, \r, \r\n, Unicode paragraph separator) to the attributedText property should do the trick.