How to know the length of NSString that fits a UILabel with fixed size?

Viewed 6490

I know NSString has methods that determine the frame size for it, using NSString UIKit Additions, sizeWithFont......

How about the other way around? I mean if I have a fixed frame size, how do I know how many characters or words for a NSString that can fit into it?

If I know this, I can cut off the NSString easily.

thanks

4 Answers
Related