iphone - I would like to increase the rowHeight as I add new cells to UITableView -
i 1 cell rowheight equal height of uitableview. add add new cells, rowheight divided total amount of cells have.
in viewdidload set default height. have:
mycellheightnum = [[nsnumber alloc] initwithint:100]; //not sure how height of uitableview set 100 in -(ibaction) addcell method have:
[mytableview beginupdates]; double value = [mycellheightnum doublevalue]; mycellheightnum = [nsnumber numberwithdouble:value * value / numofcells]; [mytableview reloaddata]; idk, ideas.
thanks,
ben
write function
-(cgfloat)tableview:(uitableview *)tableview heightforrowatindexpath:(nsindexpath *)indexpath { double value = [mycellheightnum doublevalue]; mycellheightnum = [nsnumber numberwithdouble:value * value / numofcells]; return [mycellheightnum floatvalue]; }
Comments
Post a Comment