Setting re-ordering property of a cell to NO
Can we specifically set the re-ordering property of a cell (Add c开发者_运维问答ell with + button) to NO? I cannot set editingStyle to NO as then I would not get even the + button in Add cell.
Use the delegate method: tableView:canMoveRowAtIndexPath:
.
You should use it by checking to see what the indexPath is and then return NO if the indexPath is the indexPath of a cell you do not want reorderingEnabled on.
You can set a cell's showsReorderControl
to NO
, implement tableView:moveRowAtIndexPath:toIndexPath:
and return NO
for tableView:canMoveRowAtIndexPath:
.
http://developer.apple.com/library/ios/documentation/uikit/reference/UITableViewCell_Class/Reference/Reference.html#//apple_ref/occ/instp/UITableViewCell/showsReorderControl
精彩评论