swift3.0 UITableView侧滑支持多选项
func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]?{ shareMicroId = (idArray?[indexPath.row] as? String)! let share = UITableViewRowAction(style: .normal, title: "分享"){action, index in //分享处理 } let delete = UITableViewRowAction(style: .normal, title: "删除"){action, index in //删除处理 } delete.backgroundColor = UIColor.red return [delete, share] }
我想留下来陪你生活,故事不要多,精彩就足够