How to add rows to a table section? There is such a code
NSInteger rowIndex = [dictID allValues].count; NSInteger setcionIndex = arraySection.count; [weakSelf.tableView beginUpdates]; [weakSelf.tableView insertRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:rowIndex inSection:setcionIndex]] withRowAnimation:UITableViewRowAnimationAutomatic]; [weakSelf.tableView endUpdates]; It gives me the error 'attempt to insert row 3 into section 2, but there are only 2 sections after the update'!