Remote Editing UITableView pushes cell contents to the right

When configured [self.tableView setEditing:TRUE];in the View table, the editing icons of the source tables are displayed on the left. But when using a simple style sheet, these circular icons push my background (and content) to the right.

How can I prevent the editing style of my cell position from changing and place an icon on top of the cell instead?

Now it looks like an error.

Another question about this. Is there any way to determine indexPath.row == 0not to have the delete icon on setEditing:TRUE?

+5
source share
2 answers
  • shouldIndentWhileEditing NO.
  • tableView:editingStyleForRowAtIndexPath: , :

    - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{
       if (indexPath.row == 0)
           return UITableViewCellEditingStyleNone;
       return UITableViewCellEditingStyleDelete;
    }
    
+7

, , № 1 . cell.contentView, , cell.backgroundView. , .

shouldIndentWhileEditingRowAtIndexPath , , .

+5

All Articles