Closed imzyf closed 6 years ago
func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? { let deleteAction = UITableViewRowAction(style: .default, title: "Delete") { (action, index) in debugPrint("\(index.row)-Delete") } deleteAction.backgroundColor = UIColor.red let moreAction = UITableViewRowAction(style: .normal, title: "👍") { (action, index) in debugPrint("\(index.row)-More") } moreAction.backgroundColor = UIColor.lightGray return [deleteAction, moreAction] }
合并