TableView reloadData vs. beginUpdates & endUpdates

前端 未结 3 1022
礼貌的吻别
礼貌的吻别 2020-12-04 18:22

I got a tricky problem regarding updating my TableView, i get different results using different methods of updating it, let me explain:

Situation 1:

3条回答
  •  春和景丽
    2020-12-04 18:31

    Call this method if you want subsequent insertions, deletion, and selection operations (for example, cellForRowAtIndexPath: and indexPathsForVisibleRows) to be animated simultaneously.

    I think this is what you want. beginUpdates & endUpdates can change the UItableview with animation.

提交回复
热议问题