摘自:[url=http://beike.iteye.com/blog/402449]http://beike.iteye.com/blog/402449[/url]
NSBundle* bundle = [NSBundle mainBundle];
NSString* resPath = [bunder resourcePath];
NSString* filePath = [resPath stringByAppendPathComponent:@"test.html"];
[WebView loadHTMLString:[NSString stringWithContentsOfFile:filePath] baseURL:[NSURL fileURLWithPath:[bundle bundlePath]]];
NSString *fullPath = [NSBundle pathForResource:@"test" ofType:@"html" inDirectory:[[NSBundle mainBundle] bundlePath]];
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:fullPath]]];
[m_webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",m_strURL]/*@"http://realtime.zaobao.com/2009/07/090709_26.shtml"*/]]];
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta pageSize=320x360/>
<html>
<head>
</head>
<body>
<img src="Sample.JPG"/>
</body>
</html>