UIView with auto layout does not increase height inside UIScrollView
What I'm trying to do is have a page like the following wireframe, that the height UILabel
should change dynamically based on the text:
I currently have it UIView
inside UIScrollView
. The problem is that I cannot resize correctly UIView
based on its content, for example when the description is long. Sample code can be downloaded from here
If not in customization for the code, here are the limitations and ways to customize it:
I tried using the approach mentioned in this post
FINALLY found a solution for it. You need to remove the height constraint for UIScrollView
and contentView
and add a bottom constraint as shown below:
The sample app has been updated with this change. The sample application now works as expected.