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

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

        return arr
    }
原文链接:https://www.f2er.com/swift/323612.html

猜你在找的Swift相关文章