2013-07-29 42 views
1

我有這3個委託方法實施我的刷卡刪除處理,但沒有任何事情發生,沒有這些方法被調用。刷卡刪除在tableview不觸發

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

//removes deleted object from my tabledata array 
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath; 

//checks if data actually can be deleted (all set to yes currently) 
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath; 

我到底在想什麼?即時刷我的表格細胞一整天,但沒有任何反應。

+0

你1000%肯定您分配該類完成時因爲表格代表權利? –

+0

我是1000%,我當然有 – JMD

+0

請把你的頭文件放在裏面,這樣我們就可以看到委託是否被分配了。如果您是通過代碼進行確認的,請確認 –

回答

0

確保您有數據源 & 代表連接到您的視圖控制器 ,並且確保你刷新表使用[self.tableView reloadData];