【问题标题】:iPhone Dev: Swipe a UITableCelliPhone 开发:滑动 UITableCell
【发布时间】:2010-11-23 18:34:37
【问题描述】:

如何对滑动 UITableCell 的能力进行编程。我已经有一个我一直在使用的 UITableCell 的子类。我只是像处理视图一样处理其中的滑动吗?

【问题讨论】:

    标签: iphone


    【解决方案1】:

    你需要实现这个方法:

    tableView:editingStyleForRowAtIndexPath:
    

    并返回UITableViewCellEditingStyleDelete

    要使其工作,您还需要实现这些方法:

    tableView:commitEditingStyle:forRowAtIndexPath:
    tableView:canEditRowAtIndexPath:
    

    要自定义删除按钮的文本,请参阅此线程: UITableView Swipe to delete: how to customize button and action?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-08-28
      • 1970-01-01
      • 1970-01-01
      • 2010-10-01
      • 2011-06-15
      • 1970-01-01
      • 1970-01-01
      • 2013-08-19
      相关资源
      最近更新 更多