Hi guys,
Im trying to have an option where I have two kinds Custom classes of UITableViewCells. Lets say one is bigger and the other is smaller, [detailed, small] interms of tableviewcell height.
with regards to the datasource, its a custom NSObject with a BOOL "Expanded"
Hence in CellForRow
THis part does actually work the way it should. If I add
newOb.Expanded = YES; it displays the DetailedCell.
the problem is the HeightForRow isnt getting switched.
Problem is, the Cell changes, but the height remains the same old = 44 and not 100.
Whats going wrong here?
Im trying to have an option where I have two kinds Custom classes of UITableViewCells. Lets say one is bigger and the other is smaller, [detailed, small] interms of tableviewcell height.
with regards to the datasource, its a custom NSObject with a BOOL "Expanded"
Hence in CellForRow
Code:
Ob *newOb = (Ob *)[currMainArray objectAtIndex:indexPath.row];
if(newOb.Expanded) {
DetailedCell *cell = (DetailedCell *)[self.maintableView dequeueReusableCellWithIdentifier:@"DetailedCell"];
//do the setting and
return cell;
}
else {
SmallerCell *cell = (SmallerCell *)[self.maintableView dequeueReusableCellWithIdentifier:@"SmallerCell"];
//do the setting and
return cell;
}
newOb.Expanded = YES; it displays the DetailedCell.
the problem is the HeightForRow isnt getting switched.
Code:
Ob *newOb = (Ob *)[currMainArray objectAtIndex:indexPath.row];
if(newOb.Expanded == YES)
return 100;
else
return 44;
Problem is, the Cell changes, but the height remains the same old = 44 and not 100.
Whats going wrong here?