iospdfuiwebviewqlpreviewcontroller

What is the main difference between QLPreviewController and WebView to display PDF file or any text file.?


I Searched out i can view PDF or any text file using QLPreviewController and WebView. I know both way how to display but i didn't get what is the main difference between them. Any one Tell me the Difference between this two.?


Solution

  • The primary purpose of QLPreviewController is to preview local files. That's all it does. And it provides the ability to share the document.

    WKWebView is for presenting web content and local files. It is a general web browser. It's primary purpose is for viewing web content. It lets you move back and forth through browsing history. It allows you to handle links.

    If your app needs to allow a user to view and possibly share a local document, use QLPreviewController. If your app needs a browser, use a web view.