iOS: SWRevealViewController opening WebView control without Navigation bar

309 views Asked by At

The app has a navigation bar that is included in all the scenes within the app. SWRevealViewController has been used to create a slide out menu, also appearing in all scenes. It contains a tableview that initiates the segues to other scenes. Two of the links in this menu segue to a webview control that loads a webpage. The webview loads the pages correctly, but without the navigation bar To make things more confusing, there are other scenes in the app that link to the webview where the navigation bar is loaded correctly.

The navigation bar is not included in the SWRevealViewController. Could this be why it isn't loading correctly?

Thanks in advance.

1

There are 1 answers

0
egarlock On BEST ANSWER

When you are adding a ViewController you need to add it to a UINavigationController first.

[self.revealViewController pushFrontViewController:[[UINavigationController alloc] initWithRootViewController:VC] animated:YES];
[self.revealViewController setFrontViewPosition:FrontViewPositionLeft animated:YES];