TableView's beginupdate and endupdate are better than Reloaddata and reloadrowsatindexpaths, because BeginUpdate and EndUpdate perform an animated block, The picture is very smooth when loaded. You'll find out if you try it yourself.
Load the picture with multi-threaded, to use the cache, that is, the need to load asynchronously
Try to be as simple as possible when calculating the height of the cell, because the cell height in the TableView is loaded once
To use the reuse mechanism, it must be used, or it will be card
Users habitually fast scrolling, view and data content will quickly change, if the efficiency problem is not handled well, it is easy to have a lag phenomenon. resulting in a reduced user experience.
Data refresh
If our modle is updated. The corresponding should be reflected in the uitableview above. Simple we can reload the whole tableview. This is convenient and there is no problem with the data. The only problem is that reload the whole tableview is too inefficient. And, often we're just a handful of cell content changes. So there is no need to reload the whole tableview. But that data change to refresh the corresponding cell. This is much more efficient.
Several functions related to the specific
-(void) beginupdates;-(void) endupdates; -(void) Insertsections: (Nsindexset *) Sections withrowanimation: (uitableviewrowanimation) animation;-(void) Deletesections: (Nsindexset *) Sections withrowanimation: (uitableviewrowanimation) animation;-(void) reloadsections :(Nsindexset *) Sections withrowanimation: (uitableviewrowanimation) animation; -(void) Insertrowsatindexpaths: (Nsarray *) indexpaths withrowanimation: (uitableviewrowanimation) animation;-(void) Deleterowsatindexpaths: (Nsarray *) indexpaths withrowanimation: (uitableviewrowanimation) animation;-(void) Reloadrowsatindexpaths: (Nsarray *) indexpaths withrowanimation: (uitableviewrowanimation) animation;
UITableView how to deal with the occurrence of stuttering