The white background is my cell super view and the blue background view is the container view. The container view is connected with the super view with the following constraints.
Top space to super view: 25, Bottom space to super view: 12
In the container view (Blue view) there are 3 labels.
Weekly plan, Monthly plan, Save about...
The Weekly plan label
has a height constraint of height >= 22
and it has a top space with its container view
(Blue view) which is 16 and the bottom space with the monthly label
is 10. The monthly view has a 0 bottom constraint with the save about
label. And finally the save about label
has 12 bottom constraints with the container view
.
These 3 labels could have multiple lines and I need to show them accordingly. If one line then it will show in 1 line if multiple lines then it will show all text in multiple lines.
Right now I am trying to show them with UITableView.automaticDimension
inside of the table view heightForRowAt
delegate.
case .weeklyPlan, .monthlyPlan, .annualPlan: return UITableView.automaticDimension
But it's not updating all cells properly. I didn't set any estimated row height or any other height ratio in my view did load. What I am missing here?