I know when you add a child view controller to a parent you need to perform the following steps:
Call the
addChildViewController:
method of your container view controller. This method tells UIKit that your container view controller is now managing the view of the child view controller.Add the child’s root view to your container’s view hierarchy.
Add any constraints for managing the size and position of the child’s root view.
Call the
didMoveToParentViewController:
method of the child view controller.
The document explains that you need to call didMoveToParentViewController:
to 「give the child view controller a chance to respond to the change in view ownership.」,Does anyone know what this means and what exactly didMoveToParentViewController:
does?