iphone - HOWTO use UIWebView to display a downloaded file later? -


I can format an NSURL (the path or path generator function) so that I can display a local file of the download (nodes). Application for offline use is part of NSBundle?) This idea is to snap a HTML file, clear it and hide it in the iFoo application specific storage area, then use UIWebView to display it.

Next, I am going to work with files on RTFM iFoo (iPhone / iPad) in general, but any faster start suggestions are appreciated.

You can read your local file in a string upon completion of the download and then the HTML Use UIWebView to load. Use the relative path and set the correct baseURL :

  NSArray * path = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES); NSString * yourFolderPath = [[Path ObjectAddindx: 0] StringBapping Company: @ "Your Folder"]; NSString * filePath = [yourFolderPath stringBappingSetting Path Companent: @ "yourFile.htm"]; NSString * fileContents = [NSString stringWithContentsOfFile: filePath]; NS URL * Base URL = [NSUr file URL with path: your folder path]; [YourWebView Loads HTML String: fileContents baseURL: baseURL];  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -