Pregunta

Does anyone have experience with pros and cons of using QLPreviewController vs UIWebView to open pdf and office document? And benchmark data ?

Thanks!

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top