title: UITableViewCell textLabel height resets after selecting/highlighting same cell
body: <p>I have an issue regarding UITableViewCell's textLabel property when reselecting (touching without lifting a finger) a cell that's already selected.</p>
  
  <p>I have a custom contentView being added in the background just below the textLabel that has a dynamic height (including the cell) and a background for the textLabel as well which is consistently the same height (50.0f-ish).</p>
  
  <p>I'm using beginUpdates and endUpdates method to animate the selection and a frame change to prevent the textLabel from centering in the cell right after the updates occur; keeping it roughly in the same confines of the background. There's no problem when selecting different cells and the textLabel stays on the top where it should be.</p>
  
  <p>The main issue right now is when the user touches their finger (without lifting it) on the selected cell again, the textLabel recenters according to the cell's height change.</p>
  
  <pre><code>    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
          DetailView *detailView = // Create detail view
  
          // Add UIImageView from content to cell --------------------
          UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
  
          // Change textLabel colors, fontSize, and shadow properties
          // Create CustomContentView *ccView = nil;
  
  
          // ------
          // Remove / Hide any existing CustomContentViews
          // --- Code here
          // -------
  
          switch (hasImageInCustomView) {
          case YES:
              image = _imageInCustomView;
              image = NO;
  
              if (selectedIndexPath.row != indexPath.row) {
                  [tableView beginUpdates];
                  [tableView endUpdates];
              }
  
              CGRect frame = cell.textLabel.frame;
                      frame.size.height = 50.0f;
                      cell.textLabel.frame = frame;
  
  
              return;
          break;
          default:
              image = [detailView getImage];
          break;
          }
  
          // ----
          // Calculate height for image and add that to heightForExpandedRow property
          // -- Code here...
          // ----
  
          [tableView beginUpdates];
          [tableView endUpdates]; 
  
          // Add subview with UIImageView
          customContentView = [[CustomContentView alloc] initWithFrame:(CGRect){0, 0, kWidth, dynamicExpandedRow}];
          contentView.clipsToBounds = YES;
          [cell.contentView addSubview:customContentView];
          [cell.contentView sendSubviewToBack:customContentView];
          [customContentView setContentImage:image];
  
          CGRect frame = cell.textLabel.frame;
          frame.size.height = 50.0f;
          cell.textLabel.frame = frame;
  
  }
  </code></pre>
  
  <p>I'm using iOS 3.0 so I don't think didHighlightRowAtIndexPath: will work, and I was wondering if there are any delegate methods that reset the textLabel frame after beginUpdates/endUpdates have been called.</p>
  
  <p>I've logged in the frame changes and it comes up like so:</p>
  
  <p><strong>Before beginUpdates/endUpdates have been called</strong></p>
  
  <pre><code>&lt;UILabel: 0x4e55500; frame = (10 0; 250 199); text = 'Some Text Goes Here...'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = &lt;CALayer: 0x4e55570&gt;&gt;
  </code></pre>
  
  <p><strong>After beginUpdates/endUpdates have been called and manual frame change</strong></p>
  
  <pre><code>&lt;UILabel: 0x4e55500; frame = (10 0; 250 50); text = 'Some Text Goes Here...'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = &lt;CALayer: 0x4e55570&gt;&gt;
  </code></pre>
  
  <p>The height shows 199 before those two methods are called, and 50 afterwards.
  However, the textLabel keeps on recentering vertically in the cell whenever the selected cell is reselected, regardless of the forced frame change.</p>
  
  <p>If anyone can help I'd be greatly appreciated.</p>
  
  <p>Link to picture example -> <a href="http://i50.tinypic.com/2r6o5k5.jpg" rel="nofollow">http://i50.tinypic.com/2r6o5k5.jpg</a></p>