I have a UITableView
whose cells have an image from a URL placed in its imageView
.
The image isn't square (is landscape), however it initially loads as a square in the manner in which contentMode
is scaleAspectFill
and setClipsToBounds
is YES
. So far so good.
However, when I touch down on the cell, the image "widens", that is, it retains the scaleAspect
part, but now bleeds out to the right as if setClipsToBounds
is NO
.
The same behavior occurs if the row/cell goes out of view and comes back in recycled, in which case I have the image obtained from an in-memory cache rather than from the URL.
I've tried explicitly setting both contentMode
and setClipsToBounds
for the cell.imageView
, but it seems to have no effect. Any advise? Thanks.
Before touchdown:
After touchdown (or recycle from cache):