I have a table view with UITableViewRowAction
on the cells so I can swipe a cell to reveal an action. It works perfectly on the simulator but not on device. Any ideas why?
var deleteButton = UITableViewRowAction(style: .Default, title: "delete", handler: { (action, indexPath) in
self.foodTableView.dataSource?.tableView?(
self.foodTableView,
commitEditingStyle: .Delete,
forRowAtIndexPath: indexPath
)
return [deleteButton]
}