I'm getting very confused with traits and constraints.
I have a view that needs to be in a 1:1 ratio, and it needs to have it's size dependent on the larger of either the screen width or screen height, at runtime, and with all device orientations.
On top of that, I need to move it down from the centre of the screen, by an amount that is calculated at runtime depending on orientation and iPhone vs iPad.
Is this possible or is it better to do all this in code and remove all AutoLayout constraints from this view?
I've read this: Aspect ratio constraint relative to the screen width
And also this: https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/Size-ClassSpecificLayout.html
But I still can't seem to get it to do what I want.
Can someone please clarify what I need to do?
Thanks