Because of UI elements, I created View Controller with a TableView inside. But I can\'t enable editing mode. I tried several methods without Solution. But with using TableView C
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
:
viewWillAppear
you should deselect the currently selected row in the table view.viewDidAppear
you should flash the scrollbars of the table view.