Reputation: 2811
I am trying to create a bottom toolbar. So I dragged I Bar Button Item to the View Controller and it was automatically position at the bottom, see image below:
But when I run the app, it doesn't show the bar at the bottom.
I already added:self.navigationController?.navigationBarHidden = false
Upvotes: 3
Views: 10152
Reputation: 1
Sometimes bar button item and bar button do not show when we present our screen. On screen we can then not see bar button item and bar button. So we need to push our screen if we want bar button item and rightBarButtonItem
.
Upvotes: -3
Reputation: 1985
The navigation bar and the toolbar are two different things and the toolbar is hidden by default. Try setting the toolbar hidden attribute to false.
Upvotes: 0
Reputation: 7602
Drag UIToolbar controller directly instead of only UIBarbutton item.
Upvotes: 2
Reputation: 35392
I think it's just only a constraints problem. First of all check your Document Outline near to the left of your table, to see the position (toolbar is just below table):
Add your constraints and pay attention to all options as shown in the picture:
Then, take a look to the size inspector, for the table view:
And for the toolbar:
This configuration working both in portrait/landscape mode.
Upvotes: 6
Reputation: 413
Have you set constraints of UIToolbar? I just guess it can be one of the reasons why you cannot see your barbuttoitem.
Upvotes: 0