I have a native iOS app that will have some native content and some content surfaced in UIWebViews. Overall my navigation is done with a UINavigation Controller, but once I get into the 2nd level of the web app I want to switch to the Web navigation, and I want this to appear seamless to the user.
I have found a way to hide the uinavigationcontroller when I in the 2nd view, using the following code:
NSURL *url = request.URL;
NSString *urlString = [url absoluteString];
if ([urlString isEqualToString:@"http:myApp/Page1.xsp"])
{
[self.navigationController setNavigationBarHidden:FALSE animated:YES];
} else {
[self.navigationController setNavigationBarHidden:TRUE animated:YES];
}
return YES;
}
However, when I run this I see the iOS UINavigationBar and then it moves up to the top of the screen and is hidden. This is not a good user experience.
I want to hide the navigation bar and then load the page, but cannot figure out how to do that.