views:

23

answers:

0

I have an app which has a 2 view contollers (main one and details one)

In the 1st view I load items from a RSS feed. Clicking on one item takes you to another view with Title and Description of teh item, then I have a "details" button that should open complete news details from a web Page into a UIWebView.

I added to the 2nd view Controller another view with a UIWebView and I am able to load it using:

NSString *strAddress = @"http://www.google.com";
NSURL *url = [NSURL URLWithString:strAddress];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView loadRequest:request];
[webView setScalesPageToFit:YES];

The WebView loads OK, the view controller has toolbar with a "Back button" that takes you back to the first view where you can select another item. But if you click on one item you are redirected to the second view and the UIWebView is still there.

I can't find a way to release the WebView or simply to hide it from the 2nd View Controller...How should I do it? thx!