Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reorder control isn't displayed on table view

I created an iOS application based on navigation-based application template, the application is backed by Core Data framework.

When clicking on Edit button, I want the rows to be reorder-able and delete-able.

When constructing cells, I added this line:

cell.showsReorderControl = YES;

And tableView:canMoveRowAtIndexPath: method returns YES.

But the reorder control isn't displayed in the row, Am I missing something?

like image 574
Chiron Avatar asked Jan 22 '11 17:01

Chiron


1 Answers

From the UITableViewCell showsReorderControl docs:

For the reordering control to appear, you must not only set this property but implement the UITableViewDataSource method tableView:moveRowAtIndexPath:toIndexPath:. In addition, if the data source implements tableView:canMoveRowAtIndexPath: to return NO, the reordering control does not appear in that designated row.

like image 92
Benedict Cohen Avatar answered Oct 06 '22 13:10

Benedict Cohen