Resizable UITableViewCell with variable image and content height
Displaying a variable amount of text in a tableViewCell
is easy. It’s one of those things you learn pretty early. Set the .rowHeight
to .automaticDimension
, set a top and bottom constraint, set the number of lines to 0
, and you’re done.
Trying to incorporate variable text and variable image height? Not quite so easy.
If you’re like me, you’ll fight with Auto Layout for a while, maybe refer to Stack or Medium for some pointers. You might even arrive at something that appears to get things working correctly. Then you start scrolling, and your UI goes to hell.
Sound familiar? Read on. (more…)