2012-03-02 6 views
5

Mi pregunta es la siguiente: Reordering UITableView without reorder control, utilizo estos métodos:Reordenar UITableView y esconderse de reordenación de control

- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { 
    return YES; 
} 
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath { 
    return UITableViewCellEditingStyleNone; 
} 
- (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath { 
    return NO; 
} 
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { 
    return YES; 
} 
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath{ 

} 

Y

[self.tableView setEditing:YES]; 

...... 

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
    static NSString *CellIdentifier = @"Cell"; 
    ItemTableViewCell *cell = (ItemTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 
    if (cell == nil) { 
     NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"ItemTableViewCell" owner:self options:nil]; 
     cell = [nib objectAtIndex:0]; 
    } 
    // ... 
    cell.showsReorderControl = NO; 
    return cell; 
} 

Referencias: reordering control in UITableView

El resultado es que la la tabla puede reordenarse, pero el control de reorden nunca oculta. Entonces me pregunto si estoy equivocado, o si alguien puede ayudarme. Gracias.

Respuesta

Cuestiones relacionadas