I have a two line text area for my table rows. Here is how I did it (though I did some fudging with absolute pixel values for offsets):
Code:
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
CGRect contentRect = CGRectMake(80.0, 0.0, 240, 40);
UILabel *textView = [[UILabel alloc] initWithFrame:contentRect];
textView.text = mytext;
textView.numberOfLines = 2;
textView.textColor = [UIColor grayColor];
textView.font = [UIFont systemFontOfSize:12];
[cell.contentView addSubview:textView];
[textView release];
I have this code in the cellForRowAtIndexPath method for the tableView delegate. myText is the long text that wraps.