Reputation: 1314
I am new to ios programming working on my first app. I have a tab bar controller with two tabs A and B. Both tabs are connected to table view controller with some data being shown. I want to add a bar button item on the top left "navigation" bar of the table. This would be a slide bar menu navigation item as shown in figure below
However, even though in my storyboard the menu bar button item shows up (as shown in the pic), when I run the program, the table corresponding to tab "A" that gets displayed does not show the menu item.
UPDATE: Solution (see the marked answer and comments) -Basically, you need to embed the table view controller in navigation view controller, set "Top bar" to "Navigation Bar" and then you can add a bar button item.
UPDATE 2 - Setting the top bar to "Navigation Bar" in attributes of the table view controller is optional.
Upvotes: 1
Views: 2959
Reputation: 6918
Instead of inserting the bar button in the tab view controller insert it in view controller "A."
Upvotes: 2