iphone: custom UITableViewCell taller than the default cell view.
Posted
by Luc
on Stack Overflow
See other posts from Stack Overflow
or by Luc
Published on 2010-06-15T18:26:31Z
Indexed on
2010/06/15
18:42 UTC
Read the original article
Hit count: 316
Hello,
I'm creating an application that consists of a ListView with 5 rows: - 1st one containing a graph - 2nd to 5th rows containing some data with the same formatting.
I have created 2 classes: GraphCustomViewCell and DataCustomViewCell. Depending upon the position of the cell I load the correct CustomCell with:
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"GraphCustomViewCell" owner:nil options:nil];
for(id currentObject in topLevelObjects)
{
if([currentObject isKindOfClass:[GraphCustomViewCell class]])
{
cell = (GraphCustomViewCell *)currentObject;
break;
}
}
That works fine except that the first row, the one corresponding to the graph, is bigger (in height) that the 4 other rows, and as a results it hides the 3 first other rows.
Is there any option in the table view that enables the custom cell to expand the default cells ? I'd like that the 5 rows (graph + 4 data rows) to fit the entire screen (480 - tabbar's height).
Thanks a lot for your help. Regards, Luc
© Stack Overflow or respective owner