UITableView重新加载部分崩溃

时间:2016-07-11 05:04:19

标签: ios objective-c uitableview reloaddata nsindexset

我正在使用[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:k] withRowAnimation:UITableViewRowAnimationNone];,我检查了我获得k的有效值,但我仍然得到-[NSIndexSet initWithIndexesInRange:]: Range {9223372036854775807, 1} exceeds maximum index value of NSNotFound - 1

1 个答案:

答案 0 :(得分:-1)

尝试以下可能对您有帮助的代码

NSRange range = NSMakeRange(0, 1);
NSIndexSet *section = [NSIndexSet indexSetWithIndexesInRange:range];                                     
[self.tableView reloadSections:section withRowAnimation:UITableViewRowAnimationNone];
相关问题