如何刪除刷卡上的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