I'm having a problem about my tableView. I added a bunch of items into an array and asked the tableView to populate itself with those items from the array, it worked fine, but when I changed the items' indexes (orders) in array, the tableView didn't display the items correctly. I knew my array and its items' orders worked as I expected because NSLogs told me so. Can anybody help me on this? Thanks in advance!

This is the method that I used to add new item:

```
- (IBAction)AddNewItem:(id)sender{
    BNRItem *newItem = [[VKItemStore sharedStore] createItem];
    NSInteger lastRow = [[VKItemStore sharedStore].itemsArray indexOfObject:newItem];
    NSIndexPath *indexPath = [NSIndexPath indexPathForRow:lastRow inSection:0];
    [self.tableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationTop]; 
}

```

and this is how I changed the order of items in the array: 

```
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"UITableViewCell" forIndexPath:indexPath];
    NSMutableArray *items = [VKItemStore sharedStore].itemsArray;

    if (items.count == 2) {
        items[0] = items[1];
        items[1] = [VKItemStore sharedStore].item;
     }

    NSLog(@"AFTER ARRAY: %@", items);
    BNRItem *item = items[indexPath.row];
    cell.textLabel.text = [item description];
    return cell;
}

```