我想,當用戶掃描到一個UITableViewCell的權利做一些東西,所以我用問題與刷一個UITableViewCell
- (void)tableView:(UITableView *)tableView willBeginEditingRowAtIndexPath:(NSIndexPath *)indexPath
但是我試圖向右滑動,這並沒有得到被調用,這是爲什麼?我所有的UITableView委託都被調用。
我也有這個在我的代碼:
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
return YES;
}
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
}
所有我想要做的是,當刷卡發生
這很奇怪,因爲我只是試過同樣的事情,當我刷卡時它會調用它。我確定你有,但是你說你已經建立了你的tableView委託和dataSource到self,並且把tableView委託和dataSource協議放在頭文件中?沒關係的是,我相信麥克沃斯撞上了它的鼻子 – justin 2011-05-13 18:30:00
它可能只是設置數據源而不是代表。 – 2011-05-13 19:19:13
我已經設置了代理和數據源 – aherlambang 2011-05-13 20:23:52