I'm trying to create a view that has some labels and a UITableView. First of all i tried to create a UIView => UIScrollview => UIView + UITableView After reading a lot i experienced problems with scrolls, 1 from the UIScrollView and 1 from the UITableView, so i decided to switch to the suggested approach of having: UIView => UITableView with headerview
Scroll works fine but now i have problems with Autolayout.
The header view have 2 labels. "LeftLabel" and "RightLabel". The RightLabel should have dynamic height and >= 21
In code i tried to add a text that won't fit in 1 line and with autolaout label should expand and use 2 o 3 lines to fit the text.
In this screenshot is shown only 1 line.
Constraints are set as:
I uploaded the demo proyect to github: https://github.com/Miguel86/UIViewAutolayoutExample/ Scroll works fine, but autolayout of the "headerview" not.
Any suggestion of where could be the problem?
[UPDATE] Solved using the approach explained in: https://github.com/aunnnn/TableHeaderViewWithAutoLayout