iphone - How to Edit custom UITableViewCell's Frame size? -
i using custom uitableviewcell class make table view cell. changing row height dynamically:
- (cgfloat)tableview:(uitableview *)tableview heightforrowatindexpath:(nsindexpath *)indexpath { return 60; }
its working row height perfectly.
but changing row height, not cell's frame height. cell frame height still 44 (default). how can make effective both row height cell frame?
thanks in advance..
while creating cell in cellforrow
- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { uitableviewcell *cell = [self.tableview dequeuereusablecellwithidentifier:@"myidentifier"]; if (cell == nil) { cell = [[[uitableviewcell alloc] initwithframe:cgrectmake(0,0,90,90) reuseidentifier:@"myidentifier"] autorelease]; } return cell;
}
note line
cell = [[[uitableviewcell alloc] initwithframe:cgrectmake(0,0,90,90) reuseidentifier:@"myidentifier"] autorelease];
cgrectmake(0,0,90,90) change u needed
Comments
Post a Comment