2010-01-31 1 views
3

아래 표시된 방법을 사용하여 apps 문서 디렉토리에 로컬로 저장된 HTML 파일을로드하려고합니다. 그것은 일하지 않습니다. 내가 도대체 ​​뭘 잘못하고있는 겁니까?UIWebview로 LOCAL .html 파일을로드하는 방법은 무엇입니까?

NSLog(@"Loading Saved Copy!"); 
urlAddress = [[self documentsDirectory] stringByAppendingPathComponent:@"/Profile/profile.html"]; 


      //Create a URL object. 
      NSURL *url = [NSURL URLWithString:urlAddress]; 
      //URL Requst Object 
      NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; 
      //Load the request in the UIWebView. 
      [webView loadRequest:requestObj]; 

답변

4

+[NSURL fileURLWithPath:isDirectory:]을 대신 사용하십시오.