0

I have a web page displayed in a webview and would like to allow the user to save it to something like ibooks for off-line viewing.

1 Answers1

0

You would have to make it into a supported file type of whatever application you want to send it to. iBooks doesn't support HTML, you would have to convert it to PDF or something similar.

For iBooks you would have to translate that HTML to a supported file type https://support.apple.com/en-us/ht5557

For any other application do the same according to your needs. Create an IBAction or otherwise that populates a UIDocumentInteractionController that will handle the process of 'sending/opening' to your desired application.

soulshined
  • 9,612
  • 5
  • 44
  • 79
  • Is there another native ( common) iOS app that would be better to use that could display an HTML file while off line? Could you provide a coding example of how to save file to the iOS app using Swift? I saw one using Concentric C but not Swift. – Dave Leewood Mar 02 '15 at 18:33
  • @DaveLeewood you can look at this answer to getting a starting point. Translate it to swift and still use a `UIDocumentInteractionController` and any supported apps will display, although I'm not sure which ones at this point. I'm not at my computer and won't be til I get off work so I can't troubleshoot now – soulshined Mar 02 '15 at 19:08
  • Oops. http://stackoverflow.com/questions/5606915/ios-download-and-save-html-file here it is @DaveLeewood – soulshined Mar 02 '15 at 19:16