Re: How to draw NSString with centered alignment?
Re: How to draw NSString with centered alignment?
- Subject: Re: How to draw NSString with centered alignment?
- From: "Joe Goh" <email@hidden>
- Date: Tue, 23 Jan 2007 13:30:57 +0800
On 1/23/07, I. Savant <email@hidden> wrote:
The -drawAtPoint:... method starts the left side of the string at
the point you specify. To center it that way, you need to take half
the width of the area in which you want to center the string, minus
half the width of the attributed string.
How do I get the width of an attributed string without drawing it first?
Thanks!
Joe Goh
FunkeeMonk Technology
http://www.funkeemonk.com/
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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