• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSAttributedString mysteriously truncated too soon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSAttributedString mysteriously truncated too soon
      • From: Matt Neuburg <email@hidden>
References: 
 >NSAttributedString mysteriously truncated too soon (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: NSAttributedString mysteriously truncated too soon
  • Next by Date: Re: OS_OBJECT_USE_OBJC_RETAIN_RELEASE and xpc_release()
  • Previous by thread: Re: NSAttributedString mysteriously truncated too soon
  • Next by thread: Re: NSAttributedString mysteriously truncated too soon
  • Index(es):
    • Date
    • Thread