Created
July 8, 2011 09:21
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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