So I have a tableview setup so it displays some information text with an image, the text can vary so I've set up the constraints that the cell updates its size by itself, however the images are stretching as shown below and i've checked that the content mode is set to Aspect Fit.
As it can be observed from the image there are 3 Views in the cell: -The Title -The Image, which is being stretched -The description
My constraints are set up as followed:
Title.height = 32
Image.leading = leadingMargin
Image.width = SuperView(content of cell).width * 0.4
text.leading = image.trailing + 16
How can I fix this issue so the images don't stretch? If any additional information is needed please ask and i'll add it.
Thanks -Jorge
Add a height constraint to the image matching its width so that it maintains its square aspect ratio. Or any height for that matter. Just fix the height so that it does not stretch.
image.height = SuperView(content of cell).width * 0.4