2017-01-30 175 views

回答

0

我不知道你用什麼刷卡。但是如果你想在用戶點擊單元格時處理一些操作,你應該使用didSelectRowAtIndexPath函數。例如;

override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 
    print("Tapped") 
} 
+0

我的要求是在TAP上編輯tableview單元而不是刷卡。 看到效果: - https://i.stack.imgur.com/sCoUS.gif 我希望這種效果,當單擊單元格。 – Ranjan

0

在didselect委託方法上使用此代碼,我認爲它會幫助你。

self.tableView.editing =真

相關問題