Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

forrestxu

macrumors newbie
Original poster
May 31, 2008
16
0
Hi guys,

By calling
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:mad:"http://www.google.com"]];

my application can lunch google web page. But my original application is closed.

How can I embedded the web page into my application? Some people said we can use the code below to achieve my purpose:

- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
NSLog(@"expected:%d, got:%d", UIWebViewNavigationTypeLinkClicked, navigationType);
if (navigationType == UIWebViewNavigationTypeLinkClicked) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:mad:"http://www.google.com"]];
return NO;
}

return YES;
}

It seems we need to create webView. How to do it? I hope the google page will be inside on my application.

I need your help. comments or sample code are welcome.

Thank you,

Forrest
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.