The AXTabWithAnimation is a demo demonstrates how to make a custom container view controller.
Apple Developer Official Guide
- Call the
addChildViewController:
method of your container view controller.- Add the child's root view to your container's view hierachy.
- Call the
didMoveToParentViewController:
method of the child view controller.
- Call the child's
willMoveToParentViewController:
method with the value nil.- Remove the child's root view from your container's view hierachy.
- Call the child's
removeFromParentViewController
method to finalize the end of the parent-child relationship.Call the
transionFromViewController:toViewController:duration:options:animations:completions:
method and it automatically > updates the container's view hierachy, so you don't need t add and remove the views yourself.
- Access only the root view o a child view controller.
- Child view controllers should have minimal knowledge of their container. Use the delegation design patter t manage those interactions.