UIImageView ignores AutoLayout constraints in UITableViewCell
I'm having a problem with a UIImageView inside a UITableViewCell when using autoplay. Specifically, I would like the image to be separated from the edges (20pt) with a strict size (50pt), and so I defined this: imageview to top = results in edgeview = 20 height = width = 50
What I find is that the image completely ignores its limitations (sorry for the scary emoji, this is what Google images gave me). Naturally, my desired layout would have more content, but whether or not that content is present, the effect is the same.
The setup for the project is as follows: Make one viewer app Add table view, connect datasource and write template to make at least one cell create tableviewcell with tip, add image to tableviewcell constraints for top / presenter (10 works with height 20) set image in image view so you can see it at runtime
I feel like this should be enough but it doesn't seem to work, am I missing something stupid? For comparison, this same setting does not cause problems without the tableview, the image should behave as expected
source to share
I couldn't get this to work on my own, but I think you'll get it if you try some of these:
Using auto layout in a UITableView for dynamic cell layouts and row heights
source to share