1.打开本地html
NSString *databasePathFromApp2 = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"html5.html"]; NSURL *url = [NSURL fileURLWithPath:databasePathFromApp2]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [self.m_webView loadRequest:request];
2.打开url
NSURL *url = [NSURL URLWithString:@"http://www.baidu.com"]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [self.m_webView loadRequest:request];