title: Fixing image-view in UITableViewCell in iPhone?
body: <p>I have a table-cell which has all default settings. And I put an image on the ImageView on the left, and I put some random text on TextLabel.</p>
  
  <p>and I adjust cell's height using below method.</p>
  
  <ul>
  <li>(CGFloat)tableView:(UITableView *) tableView heightForRowAtIndexPath: (NSIndexPath *)indexPath</li>
  </ul>
  
  <p>The problem is the left ImageView's frame size is different depend on the cell's height. </p>
  
  <p>See the below image, the 4th cell's height is bigger than others and it's image is slightly right compare to other images.</p>
  
  <p>What causes this and how can I solve this probelm?? </p>
  
  <p><img src="https://i.stack.imgur.com/uetq6.jpg" alt="alt text"></p>
  
  <p>-- added</p>
  
  <p>This is my cellForRowAtIndexPath method.</p>
  
  <pre><code>
      static NSString *CellIdentifier = @"Cell";
  
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
      if (cell == nil) {
          cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefaultt reuseIdentifier:CellIdentifier] autorelease];
      }
      cell.textLabel.numberOfLines = 0;
      cell.textLabel.text = [self GetSelectionForRowAtIndexPath:indexPath];
  
      NSString *path = [[NSBundle mainBundle] pathForResource:@"icon_notSelected" ofType:@"png"];
      UIImage *theImage = [UIImage imageWithContentsOfFile:path];
      cell.imageView.image = theImage;
  </code></pre>
  
  <p>This shows the imageView does not get bigger even if I put more height on the cell.</p>
  
  <p><img src="https://i.stack.imgur.com/upUO1.jpg" alt="alt text"></p>