I am trying to satisfying the constraint form a long time but getting above error ie is " Need constraints for y position or height " for Yellow View and Green View. Basically I have 2 UILabel (dynamic height) within UIView and UIImageView of 4:3 ratio within a Cell.
And my applied constraint is
I am also including sample project here with above issue.
Just one Constraints required
Provide SubHeading label height
>= ( Greater than equal to
) Constraints
Because of you have applied aspect ratio of UIImageView
of 4:3 so it required to fixed other items height and Y position before it apply a ratio to it. By giving height to subheading Autolayout is able to calculate approx value min required in image ratio
Hope it is helpful to you
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.