You refer to the Objective-C example , but you did not do what it said! The second method is the wrong method. You want to say the following:
override func tableView(tableView: UITableView, canPerformAction action: Selector,
forRowAtIndexPath indexPath: NSIndexPath, withSender sender: AnyObject?)
-> Bool {
return action == #selector(copy(_:))
}
:
override func tableView(tableView: UITableView, performAction action: Selector,
forRowAtIndexPath indexPath: NSIndexPath, withSender sender: AnyObject?) {
}