Q:

Embedding UIViewController with intrinsicContentsize

I try to implement a view that has on the top a view with dynamic height and below a UICollectionView in a storyboard.
As long as I layout that directly in one ViewController everything works fine.
When the top view is managed by a separate ViewController and embedded, I always run into autolayout problems:
SizingSample[53440:11697282] [LayoutConstraints] Unable to simultaneously satisfy constraints. (
    "<NSLayoutConstraint:0x6000030cc690 UILayoutGuide:0x600002af9180'UIViewSafeAreaLayoutGuide'.bottom == SizingSample.DynamicSizeView:0x7fda024197b0.bottom + 3   (active)>",
    "<NSLayoutConstraint:0x6000030cc960 SizingSample.DynamicSizeView:0x7fda024197b0.top == UILayoutGuide:0x600002af9180'UIViewSafeAreaLayoutGuide'.top + 20   (active)>",
    "<NSLayoutConstraint:0x6000030c52c0 'UIView-Encapsulated-Layout-Height' UIView:0x7fda024195d0.height == 0   (active)>",
    "<NSLayoutConstraint:0x6000030cc870 'UIViewSafeAreaLayoutGuide-bottom' V:[UILayoutGuide:0x600002af9180'UIViewSafeAreaLayoutGuide']-(0)-|   (active, names: '|':UIView:0x7fda024195d0 )>",
    "<NSLayoutConstraint:0x6000030cc7d0 'UIViewSafeAreaLayoutGuide-top' V:|-(0)-[UILayoutGuide:0x600002af9180'UIViewSafeAreaLayoutGuide']   (active, names: '|':UIView:0x7fda024195d0 )>"
)

IMO the 'UIView-Encapsulated-Layout-Height' constraint breaks everything, but I haven't found any way to prevent it. 
A striped down sample can be found at https://github.com/tengelmeier/viewcontroller-embedding-problem.git
How can I autolayout a view honoring the dynamic size of an embedded view(..controller)?

A:

Because ios Automatically Apply Fixed  Frame set while embedding ContainerController.you have to tell don’t translate autoresizing mask into LayoutConstraint.
You can do this by setting following Property in ContainerViewController(destination Controller) ViewdidLoad method.
view.translatesAutoresizingMaskIntoConstraints = false

