uitableview - iPhone - Smooth animation for UITableViewCell height change including content update -
possible duplicate:
can animate height change on uitableviewcell when selected?
i have table view click on swich cell, many cells of table view may change height. it's little bit complicated compute cells change size, i'd not call twice same code.
i have heightforrowatindexpath
method (this complicated one).
is there way animate cell grow or reduce feature without impacting 1 not change ?
i've tried uiview
animations, reloaddata sections animation, ... didn't find smooth. i've tried catch each cell have change , call reloaddata animation on each cell. it's near work cells updating 1 after other. , said before, don't want because must call twice heightforrowatindexpath method.
what i'd can animated each cell has changing height somthing grow or reduce movement, , not fade one.
do know way ? 1 more thing, content of cell changing little bit when size change (some text added, color changing, , things that)
uitableview has neat trick animate changes in cell heights: if send empty updates block table view, won't insert or delete cells, still recalculate cell heights entire table. though piece of code looks weird, should it:
[tableview beginupdates]; [tableview endupdates];
if want change contents of updated cells, too, must add 1 or more calls reloadrowsatindexpaths:withrowanimation:
updates block, of course.
Comments
Post a Comment