Does anyone have experience with pros and cons of using QLPreviewController vs UIWebView to open pdf and office document? And benchmark data ?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The QLPreviewController can open and display various documents such as office documents, pdf, images, movie files, text documents, etc. It also offers built in air print functionality. When opening movie files all the standard controls are there such as air play etc. It also supports multiple document previews via the QLPreviewControllerDelegate. You get all this for “free” and have to write very little code to get it.
A UIWebView can do much of this, but you will have to write more code to handle it. It will take more work to render images “properly”, and you will have to handle movies and audio on your own in some cases. There can also be issues detecting the appropriate text encoding when viewing plain text files.
The QLPreviewController is a much better “all in one” solution. There are other classes available as well if you need even more control then what the QLPreviewController will give you.