设置单元格的重新排序属性为NO

问题描述:

我们可以具体设置单元格的重新排序属性(用+按钮添加单元格)为NO吗?我无法将editingStyle设置为NO,因此我甚至无法获得添加单元格中的+按钮。设置单元格的重新排序属性为NO

使用委托方法:tableView:canMoveRowAtIndexPath:

您应该通过检查以查看indexPath是什么来使用它,如果indexPath是您不希望reorderingEnabled的单元格的indexPath,则返回NO。

您可以将单元的showsReorderControl设置为NO,实施tableView:moveRowAtIndexPath:toIndexPath:并返回NO代表tableView:canMoveRowAtIndexPath:

http://developer.apple.com/library/ios/documentation/uikit/reference/UITableViewCell_Class/Reference/Reference.html#//apple_ref/occ/instp/UITableViewCell/showsReorderControl