Reputation: 1425
This might be a silly question but I am trying to add a bar button item on a view without the need of a navigation controller in the Storyboard. For some reason when I set the navigation bar visible and try to drag the bar button item it does not stick any suggestions? Thank you in advance!
Upvotes: 0
Views: 3545
Reputation: 306
You are probably setting the Simulated Metrics Top Bar as a Navigation Bar, but that, as the name says, only SIMULATES those objects, and don't insert them on your view. That is why you can't insert the Bar Button in something that is not there.
EDIT
You could try [self.navigationController.navigationBar setHidden:YES] to hide the "second bar" that might appear after inserting the true nav bar.
Hope it helps...
Upvotes: 1