1
我想在更新後插入一些部分,但我有相同的元素。我該怎麼做?我想插入最後一個元素之後的元素。但有錯誤。insertSections in tableView
我的代碼
[self.tableView beginUpdates];
for (WallPost *wp in news) {
if (!_tableDataSource.count || ![_tableDataSource containsObject:wp]) {
[_tableDataSource insertObject:wp atIndex:_tableDataSource.count];
[self.tableView insertSections:
[NSIndexSet indexSetWithIndex:
_tableDataSource.count-1]
withRowAnimation:UITableViewRowAnimationBottom];
}
}
[self.tableView endUpdates];
你得到什麼錯誤? – RaffAl