How to enable swipe to delete cell in a TableView?

后端 未结 13 2656
悲哀的现实
悲哀的现实 2020-12-07 21:40

I have a UIViewController that implements TableViews delegate and datasource protocols. Now I want to add \"swipe to delete\" gesture to cells.

相关标签:
13条回答
  • 2020-12-07 22:41

    Conclusion of Kyr Dunenkoff chat is

    - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    }
    

    should not be defined if you need delete button to appear on swipe.

    0 讨论(0)
提交回复
热议问题