问题
@nathan this is my entire controller. My problem is that when I click a tableview cell, the image size is changed and becomes too long. I can not figure out how to fix the size, I tried everything. To do URL parsing, I used NSXMLParser, while I used SDWebImage to load images into cells.
When I press an element its size changes. Like this:
How to fix?
回答1:
That seems like a content mode issue. Set the imageView's contentMode
to aspectFit
/aspectFill
(depends on what you want to achieve)
来源:https://stackoverflow.com/questions/45338779/the-width-of-images-in-uitableviewcell-changes-to-the-click