从 UITableViewCell 显示ReorderControl 文档:
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.
我的 tableviewController 中都有这两个:
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
return YES;
}
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
NSLog(@"move from:%d to:%d", fromIndexPath.row, toIndexPath.row);
//just for test
}
我的单元格属性,包括重新排序控件:
但是我看不到重新订购控制,我错过了什么?