0
我加載內容從本地的HTML文件的WebView居住在資源文件夾下面的代碼網站沒有顯示在ipad
NSString *path1 = [[NSBundle mainBundle] pathForResource:@"about" ofType:@"html"];
NSString *html = [NSString stringWithContentsOfFile:path1 encoding:NSUTF8StringEncoding error:nil];
[self.webView loadHTMLString:html baseURL:[NSURL fileURLWithPath:[[NSBundle mainBundle]bundlePath]]];
的NSString * HTML = [NSString的stringWithContentsOfFile:PATH1編碼:NSUTF8StringEncoding錯誤:NI 1]; [self.webView loadHTMLString:html baseURL:nil];嘗試這個 – 2012-01-03 06:15:12