Closed adamrushy closed 10 years ago
Hmm this could be a bug. Could you give me more info about what you're trying to do?
Are you trying to stop re-ordering all together i.e. re-ordering without the long press gesture? Using canReorder
will only control long press re-ordering for the table. You have to use UITableView's delegate methods and properties to stop re-ordering all together.
I am going to remove re-ordering from 2 Sections in my UITableView.
For example;
if (indexPath.section == 0) { BVReorderTableView *reorder = [[BVReorderTableView alloc] init]; reorder.canReorder = NO; }
Is this the right approach?
No that is not the right approach. canReorder
is used to disable re-ordering globally and not on a row by row basis. You should be using the tableView:canMoveRowAtIndexPath:
datasource method to control this. For example:
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
return NO;
}
return YES;
}
I already tried this previously, not working as it should do..
It doesn't seem to be working for me, any clues?