title: Why does this UIImage disappear from UITableViewCell when rotating to landscape?
body: <p>I'm trying to set up a UITableViewCell that can have an image in the upper right corner.</p>
  
  <p>I have it working for portrait mode, but when I rotate to landscape, the image disappears.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  
      static NSString *CellIdentifier = @"Cell";
  
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
      if (cell == nil) {
          cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
  
          cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
  
          UIImage *cornerImage = [UIImage imageNamed:@"star_corner.png"];
          UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(cell.contentView.bounds.size.width - cornerImage.size.width,
                                                                                 0,
                                                                                 cornerImage.size.width,
                                                                                 cornerImage.size.height)];
          imageView.tag = kCornerImageViewTag;
          [cell.contentView addSubview:imageView];
          [imageView release];
      }
  
      UIImageView *theView = (UIImageView *)[cell.contentView viewWithTag:kCornerImageViewTag];
      [theView setImage: [UIImage imageNamed:@"star_corner.png"]];
  
      cell.textLabel.text = @"the text label";
      return cell;
  }
  </code></pre>
  
  <p>Interestingly, if I comment out the "cell.textLabel.text =" line, the image does show in landscape... although it doesn't shift over to the far right.</p>
  
  <p>If there's anything else I'm doing wrong here, please let me know.</p>
  
  <p>Thanks in advance for any assistance.</p>