Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I actually have the same problem right now, the current answers will not work because all of the standard views in a <code>UITableViewCell</code> are resized in the <code>layoutSubviews</code> method, so changing the frame of the view, at least in the <code>tableView:cellForRowAtIndexPath:</code> will not work.</p> <p>As far as I know you have the following options:</p> <ol> <li>Change the frame of the imageView by subclassing the UITableViewCell in the <code>layoutSubviews</code> after the <code>[super layoutSubviews]</code> call, I have tried this and you have to also move the textLabel because it will be positioned in the wrong place since the image is now bigger/smaller.</li> <li>Don't use the <code>imageView</code>, rather create your own <code>UIImageView</code>, of course you will have to reposition the textLabel or rather create your own <code>UILabel</code>, the downside is that you have to be aware of the placement and size of your <code>UIImageView</code> and UILabel when the device is rotated, tableView is resized, etc.</li> <li>Pad your images with transparency so all are the same size and be able to take advantage of the default <code>UITableViewCell</code> automatic layout</li> <li>Resize your images on the spot, like in this answer: <a href="https://stackoverflow.com/questions/6178579/incorrect-size-of-images-in-tableview">Incorrect size of Images in TableView</a></li> </ol> <p>I think I'll use the third option for my own case, since I am in control of the images used in each cell.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload