Pages

Tuesday, January 29, 2013

load Web page in UIWebView


Following code is for iPad Portrait display. (wd: 640, ht: 960)

For landscape wd and ht can be swaped

    UIWebView *uview = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 640, 960)];
[self.view addSubview:uview];

[uview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com"] cachePolicy:NSURLCacheStorageAllowed timeoutInterval:20.0]];