How to display a PDF in Objective-C? [closed]

亡梦爱人 提交于 2019-11-27 18:23:07

If you just want to display it, the easiest way is to load it in a UIWebView.

Luke

If you want to solely read and display PDFs to users, as the Mail app does on your iOS device with all the scrolling and zooming done for you, then I would use a UIDocumentInteractionController.

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIDocumentInteractionController_class/Reference/Reference.html

You'll find some useful code in one of my recent questions, here:

UIDocumentInteractionController crashing upon exit

Hope this helps.

Pranav Jaiswal

Have a look at this Apple sample code for ZoomingPDFViewer (iOS Developer membership required to see this link).

Karsten

the easiset way is with the UIDocumentInteractionController

Drawback: you need a local file-url

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!