Aloha softwareguy256,
In my apps, for example
NavySpeak, I did exactly what you're looking to do. You don't have to do exactly what I did, but here are the steps I took:
1. Create a new view controller (UIWebViewController class)
2. In the call to present the new view controller (in this case called myWebView), used the following code:
Code:
[self.navigationController presentModalViewController:myWebView animated:YES];
In this way, the new view controller covers both the navigation bar and the tabbar controller. You'll have to add a web view, a tabbar, and a tabbar button at the very least. The web view, obviously, holds the web content, but the tabbar and tabbar button are for the done button. You'll also have to add the coding for the done button (to release the modal web view).
I would suggest that you review the UIWebView documents on the Developer site, then Google web view tutorials to see how the process works.
My approach uses a modal view controller, which means it covers everything. It you don't want to cover the navigation bar (and not need to have the tabbar with the done button on the bottom), you can also just push the view controller as normal and choose not to display the tabbar (in IB, the view object has a drop-down list for the bottom bar, of which none is the option for no tabbar to be displayed). The code to call up the view controller changes just a little bit, like so:
Code:
[self.navigationController pushViewController:myWebView animated:YES];
The one thing you'll also want to do is to create custom back button text. This is for the back button (automatically create when using a navigation bar) in the left-hand corner of your navigation bar. This is the code I use:
Code:
self.title = @"My View";
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"My View" style:UIBarButtonItemStyleBordered target:nil action:nil];
self.navigationItem.backBarButtonItem = backButton;
[backButton release];
In this case, this code is put in the viewDidLoad method of the view controller class that calls up the web view. That way, when your web view is presented, the title of backButton is displayed in the back button on the webview itself. If you need more information, zag me an email at:
whjones@crispinworks.com.