On Jul 16, 2008, at 6:18 AM, norio wrote:

I think QuickTime API had an api for measuring the width and the height of an attributed string. If width was passed as an argument, the height was returned. And if height, returned its width.

Is there any ways to get such information?


For some reason, I was never able to get the built-in sizing methods to work correctly. What worked for me, though, was to use NSLayoutManager, NSTextContainer, NSTextStorage, and the - usedRectForTextContainer: method after setting the container size and forcing layout. If you search around, you might find some sample code.

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to