Aha! OK, I got it! Now what I'm trying to do is dynamically define the width of the detail text field by looking at the width of the title label left in the cell. Most of the times I run this in the simulator the title label size is 0, but occasionally I get a result. This doesn't make any sense to me, I'm thinking maybe it's because cells are being reused or so? Do you guys have any ideas?
I added this piece of code after textLabel is set:
CGSize textLabelSize = [textLabel.text sizeWithFont:textLabel.font];
And then in the case block at the beginning I do:
CGRect cellFrame = [cell frame];
float detailTextFieldWidth = cellFrame.size.width - ( textLabelSize.width + 50 );
float detailTextFieldHeight = cellFrame.size.height - 1;
NSLog(@"detail text field calculated frame width, height, %f, %f", detailTextFieldWidth, detailTextFieldHeight);
CGRect frame = CGRectMake(cellFrame.origin.x, cellFrame.origin.y, detailTextFieldWidth, detailTextFieldHeight);
UITextField* textField = [[UITextField alloc] initWithFrame:frame];