最佳答案
请在您的 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]
}
关于Swift - Tableviewcell删除图标自定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44885153/