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

时间:2015-08-05 18:22:25   收藏:0   阅读:1258
问题:(删除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];

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

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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!