I wish for each cell to have the detailTextLabel
showing.
The cell is instantiated (at cellForRowAtIndexPath:
) with :
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
And i tryed to set the style type with:
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle
reuseIdentifier:@"Cell"] autorelease];
}
(My xcode gave ARC warning with the auto release, so i also tryed with it omitted. Same result though)
I'm a little confused. Obviously without the cell == nil
, the first section of code is in vain, yet with it, the cell never has the detailTextLabel
showing. (Yes, cell.detailTextLabel.text
is being set correctly)
How would i go about this?
Update: as i am using storyboard i was able to achieve the required result by setting the Cell style to 'subtitle'. However this question of how to go about it programmatically still stands