Re: NSAttributedString mysteriously truncated too soon
Re: NSAttributedString mysteriously truncated too soon
- Subject: Re: NSAttributedString mysteriously truncated too soon
- From: Quincey Morris <email@hidden>
- Date: Thu, 08 Nov 2012 16:24:32 -0800
On Nov 8, 2012, at 13:23 , Matt Neuburg <email@hidden> wrote:
> The result (and this is the problem) is that the label truncates after the **first line** of the second paragraph ("Four score and seven years ago, our fa…"). Why? There's plenty of room in my label for more lines!
I believe it's just a quirk of the way the text system divides responsibility, which is in turn a consequence of the archeology of text capabilities. Paragraph styles let you specify *one* line (with truncation) or *multiple* lines (without truncation). There is a separate option that truncates the last line of a multiple-line paragraph (NSStringDrawingTruncatesLastVisibleLine), but AFAICT the only way to apply this option is via 'drawWithRect:options:context:' -- I don't think there's any way to specify the option as a string attribute. So, this text drawing style would require a custom view rather than a UILabel.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden