<p>Can anybody recommend a good method for determining the Rect of some wrapped text on an iPhone?  I've tried all the built-in methods for NSString in the 2.1 SDK to no avail.  The size methods never return sizes that allow me to completely fit wrapped text in my custom view.</p>

<p>I'm drawing some user customizable text that should always be as big as possible within the limits of my custom view.  If I can determine the rect needed to completely enclose wrapped text for a given max width and font size, I can raise or lower the font size until the text is just big enough to completely fill the custom view without being clipped.</p>

<p>Any help is much appreciated!</p>

NSString's sizeWithFont:constrainedToSize: method might be useful:
```
```
CGSize sizeForText = [theText sizeWithFont:theFont constrainedToSize:CGSizeMake(myMaxWidth, 9999)];
```
```
You say you've tried all the size methods, but based on your description, it sounds like what you're looking for.