forkingdog / UITableView-FDTemplateLayoutCell

Template auto layout cell for automatically UITableViewCell height calculating
MIT License
9.93k stars 2.01k forks source link

iOS11.2当调用 [self.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];时会报错attempt to delete row 2 from section 1 which only contains 2 rows before the update #366

Open 13669008190 opened 6 years ago

13669008190 commented 6 years ago

定位在了Line table file: 'UITableView+FDIndexPathHeightCache.m' line 270这里

wujianbotju commented 6 years ago

感觉是你的代码调用有误,如果一个section删除row过后导致所在的section为空,你应该调用reloadSection(如果有崩溃,试试reloadData),或者deleteRows之类的方法