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

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -