//該方法返回NO則childViewController不會自動viewWillAppear和viewWillDisappear對應(yīng)的方法
- (BOOL)shouldAutomaticallyForwardAppearanceMethods{
return NO;
}
//viewWillAppear調(diào)用設(shè)置為YES空扎,viewWillDisappear調(diào)用設(shè)置為NO
[self.customChildViewController beginAppearanceTransition:YES animated:animated];
//對應(yīng)的DidAppear調(diào)用需要成對出現(xiàn)
[self.customChildViewController endAppearanceTransition];
當(dāng) shouldAutomaticallyForwardAppearanceMethods 返回NO 的時候 我們就可以手動調(diào)用 (viewWillAppear DidAppear)方法