navController is class of UINavigationController, I add it to a view whose controller is uiviewcontroller1:
[uiviewcontroller1.view addSubview:navController.view];
Now, my question is whose is the navController's parentViewController?
(uiviewcontroller1 != n开发者_Python百科avController.parentViewController) is true?
You can use parentViewController in the tabbar, navigation and modal view context.
But, adding it's view directly to some other view, seems like you did without notify anything to the navController
.
So, I think it's nothing wrong with (uiviewcontroller1 != navController.parentViewController)
. Actually, navController
shouldn't know anything about uiviewcontroller1
at all, and stay the same as before you add it's subview to unviewcontroller1
.
精彩评论