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.

  1. to reload whole section including section's cell.

    - (void)reloadsections:(nsindexset *)sections withrowanimation:(uitableviewrowanimation)animation

example:

[tableviewcontent reloadsections:[nsindexset indexsetwithindex:1] withrowanimation:uitableviewrowanimationautomatic]; 
  1. 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]; 
  1. to reload whole tableview.

    - (void)reloaddata;

    // reloads scratch. redisplays visible rows. because keep info visible rows, cheap. adjust offset if table shrinks


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -