UICoreTextView icon indicating copy to clipboard operation
UICoreTextView copied to clipboard

Using wrap='ellipsis-tail' limits text to 1 line.

Open diakonos opened this issue 11 years ago • 0 comments

For some reason, it appears that using the 'ellipsis-tail' wrapping mode limits the text to only one line. Is this the desired behavior? I feel like it should try to fill its frame (I know I have space for more lines. Setting the wrap mode to something else shows it.) and then append an ellipsis if the text is still too long.

As far as my setup, I added an UIView to my xib, set the class to CoreTextView and then set the text using this code:

NSString *html = [NSString stringWithFormat:@"<span font='System' size='12' color='#555555' wrap='ellipsis-tail'>%@</span>", myText];
[coreTextView setContentInset:UIEdgeInsetsMake(17, 10, 0, 10)];
[coreTextView setAttributedString:[NSAttributedString attributedStringWithHTML:html]];

diakonos avatar Mar 26 '13 05:03 diakonos