如何删除刷卡上的UITableView行?我知道这个问题已经被问到,但我得到的只是错误。这里的代码:刷卡删除UITableView
-(void)tableView:(UITableView*)tableView willBeginEditingRowAtIndexPath:(NSIndexPath *)indexPath {
}
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
forRowAtIndexPath:(NSIndexPath *)indexPath {
// If row is deleted, remove it from the list.
if (editingStyle == UITableViewCellEditingStyleDelete) {
NSInteger row = [indexPath row];
[tableDataSource removeObjectAtIndex:row];
}
}
但没有任何反应。如果您编写代码,我将不胜感激。
OMG!那很简单!非常感谢! – KillaIce 2010-10-21 13:37:50
:)为什么你不接受答案呢? – 2010-10-21 13:40:18
我可以在3分钟内完成:( – KillaIce 2010-10-21 13:41:37