Answer the question
In order to leave comments, you need to log in
Why do UILabel constraints determine the height of the View, and not the pins of the View to other Views?
Please tell me, I can’t deal with Autolayot to implement the following:
1. The first image is placed, 16:9, everything is fine, there are no problems with this
2. Then comes View 1, “pins” to the picture, the edges of the screen, the height changes go several lines), this also works
3. View 3 is also generated well and correctly
PROBLEM:
I would like View 2 to occupy the remaining space between view 1 and view 3. I set the pins with the necessary indents and everything works as long as I add a label to view 2. After I set constraints for the label, the label as a subview starts to stretch or shrink the height of view2 depending on the size of the text. If it shrinks, then view1 begins to stretch. And I would like it, on the contrary, to fit into those view2 sizes that are defined relative to view 1 and view3. And if the text does not fit, I would make a read more button. If there is not enough text, let there be an empty space.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question