2010-06-24 77 views
0

我基本上沒有得到響應的響應cmmitEditinStyle後,我使用已經進入編輯模式:Havng問題的tableView

[self.tableView setEditing:NO animated:YES]; 

我設置commitEdittingstyle:

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath; 

一看就知道我會得到一個迴應,但我沒有得到任何形式的迴應後,我已經觸摸刪除按鈕。

有幫助嗎?

+0

你能澄清嗎?你是否說你的commitEditingStyle委託方法從來沒有被調用? – warrenm 2010-06-25 06:36:36

回答

0

檢查這個

[self.tableView setEditing:YES animated:YES];

  • (無效)的tableView:(UITableView的*)的tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {

如果(editingStyle == UITableViewCellEditingStyleDelete){

 // Delete your data 

    // Update your table view 

}

}