Reputation: 1295
I am building a small app and want to keep a button in the top right corner which calls a modal horizontal flip onto an "about us" page. Currently my code will load onto the page but it loses the top UI Navigation element.
My plan is to change the button function to act as a "back" button once you're on the new view. But I don't know how to make the same top bar "stick" across the entire Storyboard! I know this may be a bit confusing so I've uploaded my project source on cloudapp.
If you build & run the project you'll see a top right button with the label text "About". if you click this will perform the transition perfectly, but then on this new view we've totally lost the top bar. If I can provide any more information please let me know - just trying to get this working! as always thanks in advance
edit* just added a screen below of the top button I'm talking about :)
Upvotes: 0
Views: 950
Reputation: 682
The UINavigationBar is mainteined across different views only when you set a UINavigationController that manages an ViewController. If you don't set a UINavigationController then you can put a UINavigationBar in your View through programmatically or visually editing your aboutViewController.xib in Xcode.
Upvotes: 0
Reputation: 7931
I didn't look at your code, but if your About button presents your view controller modally you are going to lose the top bar. You could manually add in a toolbar or navbar at the top of your modal About viewController or if you want the navigation bar to stay at the top without doing that you would have to Push the About view controller.
Upvotes: 1