views:

29

answers:

1

hay all, I want to enter url in one view and then want to switch and display it in another view in uiwebView I am trying like this but its not working.

NSString *urlAddress = @"http://www.google.com";

//Create a URL object.

 NSURL *url = [NSURL URLWithString:urlAddress];

//URL Requst Object

NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];

//Load the request in the UIWebView.

[webViewController.page loadHTMLString:urlAddress baseURL:url];




webViewController *sec=[[webViewController alloc] initWithNibName:@"webView" bundle:nil];

[self presentModalViewController:sec animated:YES];

can anybody help me, I am new to iphone World

A: 

Try this out,.....

I havent checked it but it will work

  NSString *urlAddress = @"http://www.google.com";

//Create a URL object.

 NSURL *url = [NSURL URLWithString:urlAddress];

//URL Requst Object

NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];

//Load the request in the UIWebView.   

webViewController *sec=[[webViewController alloc] initWithNibName:@"webView" bundle:nil];
sec.webview=[[UIWebView alloc]initWithFrame:CGRectMake(0,0,320,480)];
sec.webview.delegate=sec;
[sec.webview loadHTMLString:urlAddress baseURL:url];

[self presentModalViewController:sec animated:YES]; 
Suriya