I am banging my head around this issue for quite a time.
I have a
UITableViewCell
that contains a UIStackView which contains inside of it 2
UIImageView's
.:
The UISTackView has it's trailing, leading and top space pinned to the Content View and the Content View height is equal to it's UISTackView.
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 even thought Content View height is equal to it's UISTackView, 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 pushing the bottom of the cell out of the cell frame and causing it to hide
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
Likewise, I have added :
tableView.beginUpdates()
tableView.endUpdates()
What am I missing here?