iphone开发 两种方式 UIWebView 显示 html

阅读更多
摘自: http://beike.iteye.com/blog/402449

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"*/]]];












你可能感兴趣的:(HTML,Java,Blog)