I’m looking to stack an overlay on top of an existing autolayout frams, such that it scales responsively to its parent’s size.
In the screenshot below you can see a simple demo setup.
The “Outer Frame” is designed to be responsive when used in a layout. The contents inside (the blue and red bars being shown as an example) will scale in response to any change in its parent frame’s dimensions.
The “Overlay” is designed to live inside the Outer Frame, stacked above the Inner Frame in the z-order. It should also fill the outer frame. Below is an image of me doing this using absolute positioning but it is NOT responsive.
(image can’t be included for dumb forum reasons)
If the Outer Frame gets resized, you have to manually resize the overlay. Here’s what happens if you don’t:
(Image omitted so I can submit this question)
When set to Absolute positioning, you lose the ability to make an element Fill its parent container, as if Autolayout is not on.
What’s the trick here to make everything work as it should?