Mamta
Mamta

Reputation: 921

Tab bar not showing on sub pages during runtime

enter image description hereI have a UITabBarController with 4 tabs, suppose A,B,C and D. I have a table view in page A. On clicking on any of the rows, E page opens. The problem is that on creating show segue from view controller A to E, the tab bar appears below in E in storyboard, whereas during runtime no tab bar is visible on E. Please could anyone help me out in this.

EDIT :

I can add tab bar item to tab bar of subview as below:

enter image description here

This is the view hierarchy : enter image description here

Note : I want to the tab bar of the main A-D tabs in all sub pages of A-D

Upvotes: 2

Views: 1726

Answers (1)

Amanpreet
Amanpreet

Reputation: 1321

I want to show you two images in different conditions. Maybe it's not a answer but will help you in some manner.

!) I have tab bar controller connected with navigation controller. That Tab bar has two items. "Top Rated" view has a button that connected to other view controller. Check right hand side attribute section for this bottom bar is none.

enter image description here

2)Same condition for second image but this time I changed the bottom bar option of this view controller(check attribute section). Now the view controller has tab bar item.

enter image description here

But this will not show in run time because this is not connected with tab bar controller. One more thing you can easily put tab bar item on new view controller that are not connected with navigation and tab bar controller, but when you run it will not there.

Updated:

This will help you. Try to set navigation inside of tab bar controller. Give tab bar item to navigation controller. Like:

enter image description here

Output is:

enter image description here

When button clicked:

enter image description here

In that manner you can tab bar in all views.

Update 2:

Here I have Navigation then Home view then the above process with tab bar controller and its working fine.

enter image description here

Updated Output:

enter image description here

When button clicked:

enter image description here

Upvotes: 2

Related Questions