• 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: Get text width outside a view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get text width outside a view


  • Subject: Re: Get text width outside a view
  • From: Marco Masser <email@hidden>
  • Date: Wed, 22 Oct 2008 20:27:25 +0200

I'm trying to calculate the width of a text

Cocoa: NSAttributedString(AppKitAdditions) implements a method named - size which gives you the size as if the string was drawn with the attributes set.


Cocoa Touch: NSString(UIStringDrawing) has some methods starting with - sizeWithFont... which do just what you want.

Marco
_______________________________________________

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: Get text width outside a view
      • From: "Christian Giordano" <email@hidden>
References: 
 >Get text width outside a view (From: "Christian Giordano" <email@hidden>)

  • Prev by Date: Re: NSInMemoryStoreType: Not really "persistent", is it?
  • Next by Date: Re: [Q] Hiding zoom & minimize buttons
  • Previous by thread: Get text width outside a view
  • Next by thread: Re: Get text width outside a view
  • Index(es):
    • Date
    • Thread