How can I get a second cell to expand so that it matches the text rather than scaling the text? Is there a built-in way to do this in iOS, or will I have to come up with some kind of ready-to-work solution? If you look in the iOS Contacts app, there will be a field like this for the address. However, I cannot find how to implement this.

For those who want to achieve this in the future, here is the code for my solution:
HEADER File:
#define FONT_SIZE 22.0f #define CELL_CONTENT_WIDTH 320.0f #define CELL_CONTENT_MARGIN 5.0f
IMPLEMENTATION:
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.section == 0 && indexPath.row == 1) { NSString *text = [atmAnnotation address]; CGSize constraint = CGSizeMake(CELL_CONTENT_WIDTH - (CELL_CONTENT_MARGIN * 2), 20000.0f); CGSize size = [text sizeWithFont:[UIFont systemFontOfSize:FONT_SIZE] constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap]; NSLog(@"Size for address is Height:%f Width:%f",size.height,size.width); CGFloat height = MAX(size.height, 44.0f); return height + (CELL_CONTENT_MARGIN * 2); } return 44.0f; }
Here is a screenshot of the result:

ios uitableview ios4
conorgriffin
source share