title: IOS: How to load local files in UIWebview eg: .png, .doc, .pdf, etc
body: <p>I need to display local fles like png,pdf,doc into uiwebview. Can anybody help how to load the  local url into webview and display the file in webview..</p>
  
  <pre><code>NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  NSString *documentsDirectory = [paths objectAtIndex:0];
  NSFileManager *manager = [NSFileManager defaultManager];
  NSString *tempUrlString = [NSString stringWithFormat:@"%@/0_iphone.png",documentsDirectory];
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/hhBZL.png" alt="enter image description here"></p>