【发布时间】:2011-09-21 23:15:29
【问题描述】:
正如主题所说,当我移动行和崩溃时,会一遍又一遍地调用此方法。 它在 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];
}
我不知道为什么。请帮忙。
【问题讨论】:
-
我编辑了这篇文章。将来,请使用大写来开始您的句子。它使其他人更容易阅读帖子。
标签: iphone uitableview iphone-sdk-3.0