The width of images in UITableViewCell changes to the click

馋奶兔 提交于 2019-12-12 04:16:32

问题


@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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!