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]
   }

  

posted @ 2017-05-17 20:34  昨天的李小白  阅读(479)  评论(0编辑  收藏  举报