【发布时间】:2017-04-05 18:24:37
【问题描述】:
我已经实现了这些方法:
func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool
{
return true
}
func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
if (editingStyle == UITableViewCellEditingStyle.delete) {
showAlertToDeleteDevice()
}
}
并在其中设置断点,但这些函数没有回调。 -cellForRowAtIndexPath 和 -didSelectRowAtIndexPath 函数完美运行,这意味着数据源和委托连接一切正常。
可能是什么问题?因为我没有通过滑动看到删除按钮。同时我看到我的另一个表的删除按钮。
【问题讨论】:
标签: ios swift uitableview swift3 ios10