Re: NSAttributedString mysteriously truncated too soon
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