答案 0 :(得分:0)
请在以下Your Controller
func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? {
let button1 = UITableViewRowAction(style: .default, title: "Your Title If You Want") { action, indexPath in
print("button1 pressed!")
}
if let image = UIImage(named: "yourImage.png"){
button1.backgroundColor = UIColor(patternImage: image)
}
return [button1]
}
希望这肯定会帮助您解决问题