주 번들에 이미지와 리소스가있는 UIWebView에 html 파일을로드하는 거의 모든 방법을 시도했습니다. 웹 페이지는 항상로드되지만 이미지를 표시 할 수는 없습니다.UIWebView 로컬 리소스 기본 번들 html 파일
background: url('image.png')
나는 또한 응용 프로그램이 여전히 행운을 다른 방법을 사용하여 실행,하지만 때 파일이 번들에 존재한다는 것을 확신했습니다
NSString *html = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"];
NSString *htmldata = [NSString stringWithContentsOfFile:html encoding:NSUTF8StringEncoding error:nil];
NSString *path = [[NSBundle mainBundle] bundlePath];
[webView loadHTMLString:htmldata baseURL:[NSURL URLWithString:path]];
HTML 코드는 CSS를 가지고있다. 누구든지 내 코드에 무슨 문제가 있는지 보지 ???
http://stackoverflow.com/questions/6420925/load-resources-from-relative-path-using-local-html-in-uiwebview/8436281#8436281 – stosha