In a WWDC 2012 session, under the heading Evolution of view controllers in iOS - (void)willMoveToParentViewController:(UIViewController *)parent and - (void)didMoveToParentViewController:(UIViewController *)parent is mentioned for use in the custom implementation of the view transition container.
If I'm not mistaken, it seems that you need to call these methods EXPLICITLY , either before - (void)removeFromSuperview , or after - (void)addSubview:(UIView *)view
However, when I registered them with subclass implementations, it shows that they were called IMPLICITLY . They were called to the right places automatically.
So, I'm a little confused if these methods REALLY NEED to be called explicitly, as described in a WWDC session, or he shouldn't follow it and clear unnecessary lines of code.
ios uiviewcontroller uiview transition wwdc
petershine
source share