在tableview中滑动以删除不触发

时间:2013-07-29 13:38:18

标签: ios uitableview

我为刷卡删除处理实现了这3个委托方法,但没有发生任何事情,也没有调用这些方法。

//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;

我到底错过了什么?我整天都在我的桌子上刷卡,但没有任何反应。

1 个答案:

答案 0 :(得分:0)

确保您拥有数据源& 委派连接到您的视图控制器 并确保在使用[self.tableView reloadData];

完成后刷新表格
相关问题