2016-04-20 8 views
0

私自身のコンテナViewControllerを実装しようとしていて、面白い問題に直面しています。カスタムコンテナViewControllerフラグisMovingToParentViewControllerが動作しない

私は、コンテナのViewControllerの実装についてたくさん読んでいるまず第一に: https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/ImplementingaContainerViewController.html

を私はこのようなVCを追加しました:

[self addChildViewController:newChildViewController]; 

NSLog(@"%@", @(newChildViewController.isMovingToParentViewController)); 

[self.view addSubview:newChildViewController.view]; 

NSLog(@"%@", @(newChildViewController.isMovingToParentViewController)); 

[newChildViewController didMoveToParentViewController:self]; 

出力は次のとおりです。

0 
0 
取り除くと同じ

子VCとisMovingFromParentViewControllerフラグ。リンゴのドキュメントによれば

答えて

関連する問題