Using UITabBarController with UINavigationController - Swift 3

旧城冷巷雨未停 提交于 2019-12-02 07:53:43

Yes, it is acceptable by Apple.

But View hierarchy is not managed correctly. In your case Tab bar will be the root view controller for 2nd navigation controller.

Also, Tab and sub tab you are pushing will be part of 2nd navigation controller.

That's the reason you are getting back on Home view controller.

It's good practice to keep navigation controller to each Tab to manage it's sub-tab hierarchy.

You could present tab bar controller or setviewcontroller from Home View controller.

First embed tab bar controller as in this image

and the embed navigation bar controller as in this image

finally this will look like

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!