• 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: CTFramesetterSuggestFrameSizeWithConstraints cuts off text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CTFramesetterSuggestFrameSizeWithConstraints cuts off text


  • Subject: Re: CTFramesetterSuggestFrameSizeWithConstraints cuts off text
  • From: Graham Cox <email@hidden>
  • Date: Sat, 18 May 2013 09:10:34 +1000

On 17/05/2013, at 11:38 PM, Koen van der Drift <email@hidden> wrote:

> // calculate the size it occupies
>
>    CTFramesetterRef framesetter = CTFramesetterCreateWithAttributedString(attrString);
> []


> // draw the string:
>
> []

>    CTFramesetterRef framesetter = CTFramesetterCreateWithAttributedString((CFAttributedStringRef) attrString);


Don't create the framesetter object twice. I'm not sure it has a bearing on your issue, but it would make sense that the framesetter used to calculate the frame should be the exact same one that draws the frame. It might be that creating it and calculating the size performs some caching that speeds up the second use. In any case it will use less memory if you only use one.

--Graham


_______________________________________________

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: 
 >CTFramesetterSuggestFrameSizeWithConstraints cuts off text (From: Koen van der Drift <email@hidden>)

  • Prev by Date: Re: CTFramesetterSuggestFrameSizeWithConstraints cuts off text
  • Next by Date: Re: [SOLVED] SecTrustEvaluate() failing with kSecTrustResultRecoverableTrustFailure
  • Previous by thread: Re: CTFramesetterSuggestFrameSizeWithConstraints cuts off text
  • Next by thread: NSPredicate on sub array items?
  • Index(es):
    • Date
    • Thread