No top navigation bar in a tab bar controller application

╄→гoц情女王★ 提交于 2019-12-04 05:22:27
Nuzhat Zari

If you want to show a navigation bar on two ViewControllers of your tab bar based application, then you can do as follows:

  1. Delete the viewcontroller1, then drag ViewController into storyboard from library and select it and go to Editor\Embed In\Navigation Controller.

  2. From the UITabBarController, click on tabbar and right click, select relationship and drag it to the navigation controller. (means add the UINavigationController as a tab).

Hope this helps!

follow as Nuzhat Zari to show navigation bar on viewcontrollers of your tabBar based application

 self.tabBar.frame =CGRectMake(0,0,self.view.frame.size.width,50);

This will make Tab Bar to appear at the top of controller.

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