• 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: Kyle Sluder <email@hidden>
  • Date: Thu, 08 Nov 2012 15:55:58 -0800

On Thu, Nov 8, 2012, at 03:42 PM, Sixten Otto wrote:
> Out of curiosity, does it matter if you change this line:
>   [content addAttribute:NSParagraphStyleAttributeName value:para
> range:NSMakeRange(title.length,1)];
>
> to this?
>   [content addAttribute:NSParagraphStyleAttributeName value:para
> range:NSMakeRange(title.length,blurb.length)];
>
> I don't know that it would, it just stuck out at me as a little odd to
> only
> add the paragraph style to one character.

Alternatively, try calling -fixAttributesInRange: on your attributed
string. On the Mac, NSTextStorage takes care of this automatically; you
may need to do it manually on iOS.

--Kyle Sluder
_______________________________________________

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

References: 
 >NSAttributedString mysteriously truncated too soon (From: Matt Neuburg <email@hidden>)
 >Re: NSAttributedString mysteriously truncated too soon (From: Sixten Otto <email@hidden>)

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