Purpose: to be able to animate the frame with the container, while it displays their original layout and scale in proportion to their container appearance.
Scenario:
- Elements located through restrictions / autorun; within the green container.
- Green container View physical coordinates (frames / borders) is configured for each animation.
- The compression and hug properties of members are set with low priority.
UIView.animateWithDuration(0, animations: { self.bounds = myBounds }) {(One) in UIView.animateWithDuration(1, animations: { self.frame = myFrame }) {(Two) in UIView.animateWithDuration(0.5, animations: { self.frame = origFrame
Here's the original layout:

I would like to have the element size of an element proportional to a container view like this:

But the member elements (one label "Hello World!") Are not adjusted accordingly, as their green container appearance enlivens the square in the upper left corner:

How to preserve the layout of UIView members in proportion to their prevailing dominant container view frame?
Note. This applies to any type of member (UIView, UITextView, ... etc.); for simple animation of position / layout and transformation (rotation).
source share