As the topic says, this method gets called over and over again when I move rows and crashes.
It works fine on iOS 4.x
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
NSUInteger fromRow = [fromIndexPath row];
NSUInteger toRow = [toIndexPath row];
id object = [[array objectAtIndex:fromRow] retain];
[array removeObjectAtIndex:fromRow];
[array insertObject:object atIndex:toRow];
[object release];
[self reloadTableView];
}
-(void)reloadTableView{
[myTableView reloadData];
}
I don’t have any idea why. Please help.
You don’t need:
…or:
If you have to reload, do this: