views:

221

answers:

1

I need to figure out the pixel length of an NSString in Cocoa on OSX and I have found a couple of links that describe how to do this using the IPhone sdk but I didn't see anything about how to do this when not targeting the IPhone. Can anyone link me to some docs that would be relevant. I did find anything in the NSString docs.

+5  A: 

-[NSString sizeWithAttributes:]

Chuck
as a side note: the reason you couldn't find it in the NSString docs is that it is dependent on several things in AppKit, so it belongs in a separate category.
cobbal