UINavigation Controller and UIWeb View Navigation

68 Views Asked by At

I am writing an Xcode Application that has the following structure:

UINavigationController UITableView Option 1 Something else Option 2 Something else Option 3 UIWebView

Within my web view I have an internal web page with a drill down structure:

UIWebView Option 1 Option a Detail from a Option b Detail from b Option c Option d Option 2 Option 3

etc.

The navigation up to the UIWeb view is handled by iOS; the navigation once I get the UIWeb view is handled by the web page.

The problem is that I am showing the navigation bar from iOS in the first UIWebView Web page, which want to do, but not in subsequent pages.

How can I handle the handoff of navigation?

1

There are 1 best solutions below

0
On

OK, I think I figured this out.

It really isn't anything to do with Xpages, but with using UIWebViews within iOS.

The problem was that on the first webView, I wanted to show the iOS Navigation, but in any subsequent ones I didn't want to - would just prefer to use the web navigation.

There is a delegation method in iOS Web views that allows you to show or hide the navigation bar. I added this delegate and just check to see which page I am on. If on the first one, I show the iOS Navigation, else I suppress.

This works great!