Issues with dynamic height for UITableViewCell with UIStackView while scrolling up

Viewed 464

I have a table view with cells with dynamic heights. Inside each cell, I have an image view and a group of 4 labels in a vertical stack view. When I first load the tableview, the cells look fine and the height is calculated correctly. This is also true for the cells that load after scrolling downwards. However, as soon as I scroll up, the height of the cell becomes huge (bigger than the entire screen).

Im not sure why this happens only when I scroll up.

tableview after initial loading

tableview after scrolling upwards

1 Answers
Related