title: UITableViewCell with UIImageView losing animation (iOS 5 bug?)
body: <p>This worked fine for me up until now - but in iOS 5, when I have an imageView on a regular UITableViewCell on a grouped tableview, and set the table from editing to NOT editing, the animation is lost and the text and image view just snap back into place instead of sliding. I am not reloading anything - I stripped my code down to almost nothing to solve this before I thought of simply commenting out the line where I say</p>
  
  <pre><code>cell.imageView.image = [UIImage imageNamed:@"image.png"];
  </code></pre>
  
  <p>and then everything worked fine. Is this a bug in iOS 5?</p>
  
  <p>EDIT: So far, I think this is a problem with the UIImageView for the delivered tableview cells. It seems like the set-not-editing animation, for custom cells and UITableViewCell WITHOUT imageView is okay. I'd love to find a way to get around this, it makes things look unprofessional.</p>
  
  <p>Below is my code for the part of the grouped tableview I am speaking of, this is part of cellforrowatindexPath:</p>
  
  <pre><code>static NSString *CellIdentifier = @"ItemDetailDefaultCell";
              UITableViewCell *cell = (UITableViewCell *)[tableView1 dequeueReusableCellWithIdentifier:CellIdentifier];
              if (cell == nil) {
                  cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
                  cell.backgroundColor = [[UIApplication sharedDelegate] defaultCellBackgroundColor];
  
                  cell.textLabel.backgroundColor = [UIColor clearColor];
                  cell.textLabel.shadowOffset = CGSizeMake(0.0, 1.0);
  
                  cell.detailTextLabel.backgroundColor = [UIColor clearColor];
  
                  cell.detailTextLabel.font = detailTextLabelFont;
                  cell.detailTextLabel.adjustsFontSizeToFitWidth = YES;
                  cell.detailTextLabel.minimumFontSize = DETAIL_TEXT_LABEL_MINIMUM_FONT_SIZE;
  
                  cell.detailTextLabel.textColor = [[UIApplication sharedDelegate] defaultDetailTextColor];
                  cell.detailTextLabel.shadowColor = [[UIApplication sharedDelegate] defaultDetailShadowColor];
                  cell.detailTextLabel.shadowOffset = CGSizeMake(0.0, 1.0);
              }
              else {
                  UIView* subview;
                  while ((subview = [[[cell contentView] subviews] lastObject]) != nil)
                      [subview removeFromSuperview];
                  cell.textLabel.text = nil;
                  cell.detailTextLabel.text = nil;
              }
              cell.selectionStyle = [[UIApplication sharedDelegate] defaultCellSelectionStyle];
              cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
              cell.editingAccessoryType = UITableViewCellAccessoryDisclosureIndicator;
              cell.accessoryView = nil;
              cell.editingAccessoryView = nil;
  
              cell.autoresizingMask = UIViewAutoresizingFlexibleWidth;
              cell.contentMode = UIViewContentModeLeft;
  
              cell.textLabel.textColor = [[UIApplication sharedDelegate] defaultMainTextColor];
              cell.textLabel.shadowColor = [[UIApplication sharedDelegate] defaultMainShadowColor];
              cell.textLabel.font = textLabelFont;
              cell.textLabel.adjustsFontSizeToFitWidth = YES;
              cell.textLabel.minimumFontSize = TEXT_LABEL_MINIMUM_FONT_SIZE;
  
              [(UACellBackgroundView *)cell.backgroundView setHeader:NO];
              if (row &lt; itemsCount) {
                  [(UACellBackgroundView *)cell.backgroundView setPosition:UACellBackgroundViewPositionMiddle];
              }
              else {//row == items.count
                  if (self.editing) {
                      [(UACellBackgroundView *)cell.backgroundView setPosition:UACellBackgroundViewPositionMiddle];
                  }
                  else {
                      [(UACellBackgroundView *)cell.backgroundView setPosition:UACellBackgroundViewPositionBottom];
                  }
              }
              cell.textLabel.text = item.name;
              cell.imageView.image = [UIImage imageNamed:@"status1.png"];
  return cell;
  </code></pre>