In my app I would like to have a way to make the user go to a website, but not leave my app.
I do that with a UIWebView.
I’d like to constantly have a "Back to app" button on the NavigationBar on the top.
The rest of the Web navigation (back, forward) should be on the top as well, but appear and disappear with the context.
The problem is that I don’t know how to make the buttons appear on the UINavigationController.
How can this be done?
I have my UIWebViewDelegate set up to receive all the relevant functions, but the buttons don’t appear.
EDIT: I need to solve this programmatically
You can not have more than two buttons on the NavigationController’s navbar without doing some tricks. There are two properties
self.navigationItem.leftBarButtonItemandself.navigationItem.rightBarButtonItem. If not, add a custom view and place the buttons there. A good way to implement multiple buttons with multiple actions is shown here.