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 != navController.parentViewController) is true?
From stackoverflow
-
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,navControllershouldn't know anything aboutuiviewcontroller1at all, and stay the same as before you add it's subview tounviewcontroller1.
0 comments:
Post a Comment