I am banging my head around this issue for quite a time. I have aUITableViewCell
that contains 2 UIImageView's
. look like this:
Now the way it works is that when I slide with my finger on one of the pictures, that picture should expand it's width to the other side of the screen and it's height should enlarge to the size of the expanded width to make it even (I am using UIPanGestureRecognizer
), which requires the UITableViewCell
to enlarge too.
But for some reason I have not managed to accomplish this presumably simple task. and although the UiImageView's
are enlarging as I want, but the UITableViewCell height - remains static. which results in the bottom of the cell getting hidden
Based on suggestions to similar questions asked in stack overflow, I have tried the following, yet I still cannot resolve the issue.
I have added the following snippet of code in my viewDidLoad
:
tableView.rowHeight = UITableViewAutomaticDimension
tableView.estimatedRowHeight = 470
but not only this did not solve the problem, Now with the automatic height most of the cell is hidden and only the top is shown. seems like for some reason it requires a static row height but then again How do I cause the cell height to enlarge in response to UIImageView
enlargement within the cell.