Reputation: 1195
I am trying to create a Table View Cell that has three pronounced regions. The top region is conditional so it doesn't always show. The Middle region is my main region where general information is. The Middle region can be clicked and that expands/shows the bottom region aka show more, show less functionality.
All regions heights need to be auto sized based on their contents.
What I tough of doing is making each region a separate UIView. And when I need to hide top or bottom region I just constrain their width to 0.
I need to know if all this would be possible with auto layout as I have never used it. Is this the correct way of doing it?
Upvotes: 0
Views: 42
Reputation: 681
Yes it is possible. take a look at this link it should answer all your questions.
Upvotes: 3
Reputation: 489
You should use UITableViewAutomaticDimension. You can also refer this link it matches your requirement
Upvotes: 0