ios - UITableView ReloadData Animate Cell UI -


in tableview need animate ui of every cell tableview reloads data.

this needs custom animation, not fade or default transition.

for example, when tapping 'edit' button, in view, tableview reloads , each cell updates ui new edit mode.

however, during reload have tried using uiview animation block update constraint on uilabel in cells, not animate.

here code run when call reloaddata on tableview. called in cellforrowatindexpath method.

[uiview animatewithduration:0.3f delay:0 options:uiviewanimationoptioncurveeasein animations:^     {         //does not animate         _lblcontainerleftconstraint.constant = 18;         [self setneedslayout];          //does animate         _reordericon.alpha = 0.5f;      } completion:nil]; 

any appreciated, thanks.

i think need in willdisplaycell rather cellforrowatindexpath since called before display close can point appears on screen.

then set new constraint value before animation block , call [cell.contentview setneedslayout] indicate layout needed on cell content.

finally add [cell.contentview layoutifneeded] , alpha change in animation block should animate constraint change on time period.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -