I’ve got a UITableView instance and implemented:
tableView:canEditRowAtIndexPath:
tableView:editingStyleForRowAtIndexPath:
tableView:shouldIndentWhileEditingRowAtIndexPath:
tableView:canMoveRowAtIndexPath:
tableView:moveRowAtIndexPath:toIndexPath:
After that I can see all my cells with reorder controls.
Apple’s header says:
@property(nonatomic) BOOL showsReorderControl; // default is NO
If the default value is NO why am I seeing the reorder controls?
Update:
I’ve also checked the value of property in tableView:cellForRowAtIndexPath: right after when the cell is created:
(lldb) p [c showsReorderControl]
(BOOL) $1 = NO
When you return YES from
tableView:canMoveRowAtIndexPath:, it does the same thing as setting theshowsReorderControlto YES. These are just two different ways to enable the reorder control.In fact, there is a third way – let’s never complain that we don’t have options! 😉 From the documentation of
tableView:canMoveRowAtIndexPath::