ZoomingPDFViewer示例错误 [英] ZoomingPDFViewer example error

查看:91
本文介绍了ZoomingPDFViewer示例错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试开发一个可以显示PDF文件的应用。我尝试用ZoomingPDFViewer
http://developer.apple.com/library/ios/#samplecode/ZoomingPDFViewer/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010281-Intro-DontLinkElementID_2

I'm trying to develop an app that can show a PDF file. I try to complete this with ZoomingPDFViewer http://developer.apple.com/library/ios/#samplecode/ZoomingPDFViewer/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010281-Intro-DontLinkElementID_2

苹果库中的代码。当我将代码与我的代码混合时,某些功能无效。如果我使用相同的代码(不混合),应用程序会抛出此错误:

code that is in the apple library. When I mix that code with my code some function doesn't work. And if I make it with the same code (don't mixed) the app throw this error:

* 由于未捕获的异常而终止应用'NSInvalidArgumentException' 的,理由是: ' - [UIView的setPDFPage:]:无法识别的选择发送到实例0x6a833f0'

* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setPDFPage:]: unrecognized selector sent to instance 0x6a833f0'

我在SDK 5.0的要求说我应该编译在SDK 5.1但样本运行完美,问题出在我的项目中,但我不知道我的错误是什么。

I'm in SDK 5.0 the requirements says that I should compile it in SDK 5.1 but the sample runs perfect, the problem is in my project but I don't know what is my error.

如果有人可以帮助我,我将不胜感激这个奇怪的错误。

I'll appreciate if someone can help me with this strange error.

推荐答案

检查故事板中的班级设置。

Check the Class setting in Storyboard.


  • 视图控制器 - >自定义类:ZoomingPDFViewerViewController和

  • 滚动视图 - >自定义类:PDFScrollView

第二个设置是导致错误的原因。

The second setting is the cause of your error.

这篇关于ZoomingPDFViewer示例错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆