cell侧滑显示多个按钮(Swift)

前端之家收集整理的这篇文章主要介绍了cell侧滑显示多个按钮(Swift)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
  1. func tableView(tableView: UITableView,editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? {
  2. let row = UITableViewRowAction.init(style: UITableViewRowActionStyle.Default,title: "删除") { (action,indexPath) in
  3. print("此处写删除业务逻辑")
  4. }
  5. let rowsec = UITableViewRowAction.init(style: UITableViewRowActionStyle.Default,title: "标记") { (action,indexPath) in
  6. print("此处写标记业务逻辑")
  7. }
  8. let arr:Array = [row,rowsec]
  9. rowsec.backgroundColor = UIColor.orangeColor()
  10.  
  11. return arr
  12. }

猜你在找的Swift相关文章