我有一个 UITableViewCell,它是 CEWendell's SWTableViewCell 的子类,一种允许通过水平滑动访问自定义按钮的单元格。问题是即使使用 tableView:moveRowAtIndexPath:toIndexPath:
和 tableView:canMoveRowAtIndexPath:
已实现,并明确具有 [cell setShowsReorderControl:true]
,开始编辑时不会显示重新排序控件。
我还使用常规 UITableViewCell 对此进行了测试,结果相同。
最佳答案
这是一个有点愚蠢的错误。因为我使用的是 UIViewController
子类,不是 UITableViewController
子类,我需要设置 [self.tableView setEditing:!self.tableView.editing animated:true]
,不是 [self setEditing:!self.editing animated:true]
为了让 tableview 开始编辑。
关于ios - 自定义 UITableViewCell 不显示重新排序控件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37314766/