我有一个疯狂的问题。我想在我的应用程序中实现"轻扫以删除"在我的Swift中的UITableView中。
非常简单,滑动工作正常,但从不显示我的红色删除按钮。
func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
// If a row could not be edited we have to return false for the row index
return true
}
func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
}
我已经在3个新项目中对此进行了测试,当我自己编写这些函数时,按钮从不显示,我不知道为什么!
我已经下载了他的代码以确保,他的代码工作正常,我有删除按钮。
我的TableView工作正常,没有bug,没有问题,调试器告诉我什么都没用。我输了!这是Xcode的错误吗? 这是一个屏幕 My issue 我想要的是什么: Yay
你们有什么想法吗?
答案 0 :(得分:2)
很抱歉浪费时间的人,我有同样的问题:
Monotouch "Swipe To Delete" CommitEditingStyle Not Firing
我的桌面视图比屏幕范围大...所以我的按钮在这里,但我看不到它!
感谢您的帮助! 捂脸