Skip to content

Instantly share code, notes, and snippets.

@bartolsthoorn
Created July 8, 2011 09:21
Show Gist options
  • Save bartolsthoorn/1071431 to your computer and use it in GitHub Desktop.
Save bartolsthoorn/1071431 to your computer and use it in GitHub Desktop.
The webview does not fill the entire height in landscape mode. (300,800). Odd.
- (void)viewDidLoad
{
[self setupPages];
[super viewDidLoad];
}
- (void)setupPages
{
UIWebView *wview;
wview = [[UIWebView alloc] initWithFrame:CGRectMake(16, 16, 300, 800)];
wview.autoresizingMask=(UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth);
[wview setTag:1];
//Set the URL to go to for your UIWebView
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 URL into the web view.
[wview loadRequest:requestObj];
[wview setDelegate:self];
[self.view addSubview:wview];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment