首页 > 其他 > 详细

'Invalid update: invalid number of sections. The number of sections contained in the table view aft

时间:2015-08-05 18:22:25      阅读:1258      评论:0      收藏:0      [点我收藏+]
问题:(删除tableview中的section时)

 Terminating app due to uncaught exception ‘NSInternalInconsistencyException‘, reason: ‘Invalid update: invalid number of sections.  The number of sections contained in the table view after the update (5) must be equal to the number of sections contained in the table view before the update (5), plus or minus the number of sections inserted or deleted (0 inserted, 1 deleted).‘


解决:

[self.tableview beginUpdates];    // 必须添加 开始更新  和结束更新,中间必须删除 数据

    [self.tableview deleteSections:indexset withRowAnimation:UITableViewRowAnimationRight];

    

    [_arrayTableCellData removeObjectAtIndex:row];

    [self.tableview endUpdates];

版权声明:本文为博主原创文章,未经博主允许不得转载。

'Invalid update: invalid number of sections. The number of sections contained in the table view aft

原文:http://blog.csdn.net/yishengzhiai005/article/details/47300531

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!