views:

103

answers:

1

I have the following code:

static NSString *CellIdentifier = @"Cell";
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease];

cell.textLabel.text = @"Publisher";
cell.detailTextLabel.text = @"This Is A Very Very Long String";

which results with the following look: (only first table row is relevant)

alt text

As it appears, the detail text is overlapping the "Publish" title so both strings are truncated. What I wish is to have the "Publish" title neverc being truncated as follows:

alt text

Is this possible using UITableViewCellStyleValue1? I saw many posts suggesting to create a custom cell but is it really the only way?

Thanks, Josh

A: 

You can try to set adjustsFontSizeToFitWidth property for cell's labels to YES and minimumFontSize property to an appropriate value. If it does not help - it seems you should use custom cells indeed.

Vladimir
Thanks, I'll give it a try and post results
Joshua
On my 3.1.3 device that didn't work...
Joshua