views:

95

answers:

1

I am trying to load an HTML file stored locally on the apps documents directory using the method shown below. It ain't workin. What am I doing wrong?

    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];
+1  A: 

Use +[NSURL fileURLWithPath:isDirectory:] instead.

KennyTM