UIWebView loadRequest
- (void)loadRequest:(NSURLRequest *)request
Parameters of [UIWebView loadRequest]
request
A URL request identifying the location of the content to load.
Discussion of [UIWebView loadRequest]
To stop this load, use the stopLoading method. To see whether the receiver is done loading the content, use the loading property.
UIWebView loadRequest example.
- (void)viewDidLoad {
[super viewDidLoad];
webView.delegate = self;
NSURL *url = [NSURL URLWithString:@"http://www.google.com"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView setScalesPageToFit:YES];
[self.webView loadRequest:request];
}
[super viewDidLoad];
webView.delegate = self;
NSURL *url = [NSURL URLWithString:@"http://www.google.com"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView setScalesPageToFit:YES];
[self.webView loadRequest:request];
}
Example of [UIWebView loadRequest].
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.
[webView loadRequest:requestObj];
//Create a URL object.
NSURL *url = [NSURL URLWithString:urlAddress];
//URL Requst Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
//Load the request in the UIWebView.
[webView loadRequest:requestObj];
UIWebView loadRequest example.
[activityIndicator startAnimating];
NSURL *url = [NSURL URLWithString:urlWeb];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[vue loadRequest:request];
vue.scalesPageToFit = YES;
And here is the protocol methods
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
[activityIndicator stopAnimating];
}
NSURL *url = [NSURL URLWithString:urlWeb];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[vue loadRequest:request];
vue.scalesPageToFit = YES;
And here is the protocol methods
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
[activityIndicator stopAnimating];
}