Q:

uiwebview ,objective c

i want to pull the html content from a given webpage. when i run the code given below,it loads the entire browser... say... google.com... into the UIWebView..i want the html content to be shown in my UIWebView... i used [webVieww stringByEvaluatingJavaScriptFromString:@"document.body.innerHTML"] in webViewDidFinishLoad
its not pulling the content... did i make a mistake... if something is wrong I'd be glad if you guys could correct my code.
icodeBrowserViewController.m
#import "icodeBrowserViewController.h"

@implementation icodeBrowserViewController

@synthesize webView,addressBar,activityIndicator;

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad 
{
    [super viewDidLoad];
    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://firesky.com"]]];
}

-(IBAction)gotoAddress:(id) sender
{
    NSURL *url=[NSURL URLWithString:[addressBar text]];
    NSURLRequest *requestObj=[NSURLRequest requestWithURL:url];
    [webView loadRequest:requestObj];
    [addressBar resignFirstResponder];
}

-(void)webViewDidFinishLoad:(UIWebView *)webVieww
{
    js_result=[webVieww stringByEvaluatingJavaScriptFromString:@"document.body.innerHTML"];
    [activityIndicator stopAnimating];
}

A:

I'd use UITextView for this:
NSString *pageContents = [NSString stringWithContentsOfURL:myGoogleURL encoding:NSUTF8StringEncoding error:nil];
myUiTextView.text = pageContents;

