【问题标题】:UITableViewRowAction Sliding RightUITableViewRowAction 向右滑动
【发布时间】:2015-03-09 21:28:33
【问题描述】:
     func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [AnyObject]?  {

    var activate = UITableViewRowAction(style: UITableViewRowActionStyle.Normal, title: "Activate") { (action, indexpath) -> Void in

    }

    activate.backgroundColor = UIColor.greenColor()

    var deactivate = UITableViewRowAction(style: UITableViewRowActionStyle.Default, title: "Deactivate" , handler: { (action:UITableViewRowAction!, indexPath:NSIndexPath!) -> Void in

    })



    return [activate, deactivate]
}

这是我目前用来让我能够向左滑动并接收“激活”和“停用”框的代码。

做了一些研究,很多人都说 UITableViewRowAction 没有一种方法可以让你向右滑动而不是向左滑动。我想知道是否有人找到了一些解决方法?

【问题讨论】:

    标签: swift sliding uitableviewrowaction


    【解决方案1】:

    这是 Objective C 中的一组类,您可以使用它们来执行此操作:

    HHPanningTableViewCell

    我修改为支持左右滑动。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-02-17
      • 2013-02-17
      • 2015-07-10
      • 1970-01-01
      • 1970-01-01
      • 2010-10-10
      • 1970-01-01
      相关资源
      最近更新 更多