如何以编程方式调用UITableView向左滑动

时间:2017-08-18 17:13:20

标签: ios swift uitableview

我想在编辑模式下自定义UITableView的删除指示符。

enter image description here

由于我似乎无法找到自定义第一张图片中显示的删除按钮的外观样式的方法,因此我使用自己的按钮创建了自己的动画。

enter image description here

我已使用以下方式停用红色标准按钮:

func tableView(_ tableView: UITableView, editingStyleForRowAt indexPath: IndexPath) -> UITableViewCellEditingStyle {

    return .none

}

现在我的问题:我如何实现与标准按钮相同的行为?如果按下红色按钮,它会在单元格上调出一个向左滑动,显示想要的删除按钮。

enter image description here

非常感谢帮助。

0 个答案:

没有答案
相关问题