Deleting the last section of a UITableView causes an exception

后端 未结 2 1813
感情败类
感情败类 2021-01-24 07:34

Terminating app due to uncaught exception \'NSInternalInconsistencyException\', reason: \'UITableView internal bug: unable to generate a new section map with old section count:

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-24 08:14

    You seem to be deleting the only section in the table. A table must have at least 1 section. You might want to check your code to check that you are not returning 0 in numberOfSectionsInTableView:

提交回复
热议问题