extension viewController: UITableViewDelegate {
func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
return true
}
func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {
let del = UITableViewRowAction(style: .default, title: "删除") { (act, indexpath) in
print("你想删就删啊?我还没做好呢")
}
return [del]
}
}
UITableView的侧移编辑功能,可多个
最新推荐文章于 2019-07-02 16:15:15 发布