-(void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)oldPath toIndexPath:(NSIndexPath *)newPath {
if(oldPath.section == newPath.section && oldPath.row == newPath.row) return;
NSMutableArray * group = (NSMutableArray *) self.groups;
NSMutableArray *gItems = [group objectAtIndex:oldPath.section];
NSDictionary *item = [gItems objectAtIndex:oldPath.row];
[gItems removeObjectAtIndex:oldPath.row];
gItems = [group objectAtIndex:newPath.section];
[gItems insertObject:item atIndex:newPath.row];
[self.tableItems moveRowAtIndexPath:oldPath toIndexPath:newPath];
}
Trying to move rows between sections. however it crashes every time it runs the line [self.tableItems moveRowAtIndexPath:oldPath toIndexPath:newPath], what did I do wrong? Ty in advance.
figured out the problem…. just remove
[self.tableItems moveRowAtIndexPath:oldPath toIndexPath:newPath];and it works fine.