How to enable swipe to delete cell in a TableView?

后端 未结 13 2631
悲哀的现实
悲哀的现实 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:18

    You can see all necessary methods by creating a UITableViewController class (temporary) in XCode 5 and then copy which method you would like to use. Those methods you need will be commented out with pre-filled in lines you desire.

提交回复
热议问题