我想知道UIWebView
在从标准NSURLRequest
接收HTML时如何处理图像。例如,如果我有以下HTML;
<body>
<!-- header -->
<header>
<div class="container">
<img src="images/logo.jpg" WIDTH="500" HEIGHT="60" alt="pingpong">
</div>
</header>
// then the rest of the site (txt, links, more pics etc)
</body>
所以考虑上面的HTML,如果我像这样对这个HTML发出以下请求;
- (void)viewDidLoad {
NSString *urlAddress = @"http://www.myurl.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];
}
当'webView'通过loadRequest
调用收到'requestObj'时,webview如何处理HTML中的图像?
<img src="images/logo.jpg" WIDTH="500" HEIGHT="60" alt="pingpong">
遇到像这样的图像时UIWebView
做了什么?它如何获取图像数据/文件等?