ios - Reload UITableView without reloading header section -
i have uitableview
section , index title. when user click on cell option view of height 42 gets display in cell. display option reload cell. section header getting updated. gives bizarre animation. how reload cell,without getting called other delegate method heightforheaderinsection
, viewforheaderinsection
.
there several methods reloading tableview.
to reload whole section including section's cell.
- (void)reloadsections:(nsindexset *)sections withrowanimation:(uitableviewrowanimation)animation
example:
[tableviewcontent reloadsections:[nsindexset indexsetwithindex:1] withrowanimation:uitableviewrowanimationautomatic];
to reload single/multiple cells
- (void)reloadrowsatindexpaths:(nsarray<nsindexpath > )indexpaths withrowanimation:(uitableviewrowanimation)animation
example:
[tableview reloadrowsatindexpaths:[nsarray arraywithobject:[nsindexpath indexpathforrow:0 insection:1]] withrowanimation:uitableviewrowanimationfade];
to reload whole tableview.
- (void)reloaddata;
// reloads scratch. redisplays visible rows. because keep info visible rows, cheap. adjust offset if table shrinks
Comments
Post a Comment