Swift / Enable Editing Mode in View Controller

只谈情不闲聊 提交于 2019-12-03 00:17:16

You forgot to put the table view in editing mode:

override func setEditing(editing: Bool, animated: Bool) {
    super.setEditing(editing, animated: animated)
    self.tableView.setEditing(editing, animated: animated)
}

I'm assuming you have a tableView property. Adjust as needed.

Some other things you may want to do to emulate a UITableViewController:

  1. In viewWillAppear you should deselect the currently selected row in the table view.
  2. In viewDidAppear you should flash the scrollbars of the table view.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!