How do I create a text field or label that resizes based on how much text is in it? [duplicate]
Possible Duplicate:
How do I wrap text in a UITableViewCell without a custom cell
I've seen at least one application that uses a grouped UITableView with a cell containing paragraphs of text, and the cell is taller or shorter based on the length of the text, but I don't quite get how this is done.
How does one, given a variable width font, figure out how high a UITextField or something needs to be in order to display all of the text contained in it without reducing the point size of the font?
See Apple's documentation about NSString
additions for the iPhone to read about which methods to use to calculate these metrics.
精彩评论