开发者

Some problem of UINavigationController's parentViewController

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜