Invalid update: invalid number of items in section 0.

前端 未结 1 1991
一向
一向 2020-12-18 11:40

Recently I got the following error:

Fatal Exception: NSInternalInconsistencyException Invalid update: invalid number of items in section 0. The num

相关标签:
1条回答
  • 2020-12-18 12:11

    The call to insertItems(at:) and deleteItems(at:) must be accompanied with change in the datasource as well.

    So, before calling these APIs, you would want to change your datasource, i.e. add objects into it before calling insertItems and remove objects from it before calling deleteItems

    0 讨论(0)
提交回复
热议问题