Let's say I have a UIView that contains a child UIView which has to be 4:3. I want to solve this problem using AutoLayout in code.
I've been struggling with AutoLayout but I haven't figured out yet how to do this.
Do you know how to solve this problem?
Thank you very much.
I attach an image to explain better what I mean. http://d.pr/i/d0Oc
I have try all answers above but didn't work, and this is my solution with swift 3:
Here is the syntax for Swift 3:
I figured out.