title: Not loading JS and CSS files when loading html in to Uiwebview IOS?
body: <p>I had an application in which I am downloading the html file and with js and css files in to application document directory.Then When i am adding the html in to UIwebview the CSS files are not loading.I am doing like this </p>
  
  <pre><code>`  NSString *docsDir;
      NSArray *dirPaths;
  
      dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
      docsDir = [dirPaths objectAtIndex:0];
  
  
  
      NSArray *ipaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
      NSString *idocumentsDir = ([ipaths count] &gt; 0) ? [ipaths objectAtIndex:0] : nil;
      NSString *str=[NSString stringWithFormat:@"%@",[dictionary valueForKey:@"htmlfilename"]];
      NSString *idataPath = [idocumentsDir stringByAppendingPathComponent:str];
      NSLog(@"idataPath:%@",idataPath);
  
      //Create folder here
      if ([[NSFileManager defaultManager] fileExistsAtPath:idataPath])
      {
  
  
  
  
  
          NSError *err;
          NSString *html = [NSString stringWithContentsOfFile:idataPath encoding:NSUTF8StringEncoding error:&amp;err];
          html = [html stringByReplacingOccurrencesOfString:@"../css/style-ios.css" withString:@"./style-ios.css"];
          html = [html stringByReplacingOccurrencesOfString:@"../.././style-ios.css" withString:@"./style-ios.css"];
          html = [html stringByReplacingOccurrencesOfString:@"../../../style-ios.css" withString:@"./style-ios.css"];
          html = [html stringByReplacingOccurrencesOfString:@"../../../lib/js-ios.js" withString:@"./js-ios.js"];
  
  
          NSLog(@"%@",html);
         [self.formswebview loadHTMLString:html baseURL:[NSURL fileURLWithPath:idataPath]];
  
  
  
      }
  `
  </code></pre>
  
  <p>But this is not loading css files.Can anybody please guide me on where i am going wrong?</p>