ContainerView plays a crucial role while transitioning between views and managing it's hierarchy. I created this simple custom but animated transition using swift.
Where you can use ContainerView:-
1) Whenever you need to manage view hierarchy, like hiding or a layer property.
2) Custom side menu bar, take one container reference in a controller and link that to another view which is actually a side menu view.
3) Custom tab bar:- On each tap over tap bar button, load new view on the container.
4) While transition effect, about all context use container for the animation.
I must say, for every single custom coding you can manipulate container for different use. I am glad to share what I have experienced while consuming the container view.
Class Link: https://drive.google.com/file/d/1nu5cEpLksKVSyvseLsUmT_xuPn6cz9iI/view?usp=sharing