Reputation: 467
I have an ImageView that are pinned to top, left and right. I want it to increase/decrease height after what device it is viewed on and therefore did not add a specific height or pin it to the bottom, but instead added aspect ratio.
Under the ImageView, I have two labels that will vary in height. One can be a maximum of 4 lines (OVERSKRIFT OVERSKRIFT...) and the other should not have a limit (Label).
I do however see a mistake in the constraints as the image suggests. How can I solve this issue?
Upvotes: 0
Views: 198
Reputation: 4075
Click, UILabel
, in Size Inspector
, Give horizontal
and vertical
as 1000
& 1000
respectively for both Content Hugging Property
and Content Compression Resistance Priority
.
Click, UILabel's Height
Constraints, in Size Inspector, Change its Priority
to 750
.
Upvotes: 0
Reputation: 100503
1- Remove the bottom most constraint and re add it
2- set content Hugging priority vertical to overskirt label to 1000
Upvotes: 1