读书人

iphone开发 两种模式 UIWebView 显示

发布时间: 2012-06-26 10:04:13 作者: rapoo

iphone开发 两种方式 UIWebView 显示 html

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]]];
?

读书人网 >Web前端

热点推荐