NSMutableParagraphStyle *paragraph = [[NSMutableParagraphStyle alloc] init]; paragraph.lineBreakMode = NSLineBreakByTruncatingTail; [attributedString addAttribute:NSParagraphStyleAttributeName value:paragraph range:NSMakeRange(0, [attributedString length])]; descriptionLabel.attributedText = attributedString;
Use the above code and your UIelement shortcut or such a .U button will receive ellipses in the last line. And I'm also trying to add a line to the end, but I didnot. because in a limited area, the label shows usability information for hiding only. In this line, in addition to ellipses, I tried some text. Please provide less information.
source share