iOS升级为iOS11,我的 PDF 阅读器停止工作,并且应用程序崩溃,原因是无法识别的选择器调用了对象的所有属性

@interface PDFScrollView : UIScrollView <UIScrollViewDelegate>
// Frame of the PDF
@property (nonatomic) CGRect pageRect;
// A low resolution image of the PDF page that is displayed until the TiledPDFView renders its content.
@property (nonatomic, strong) UIView *backgroundImageView;
// The TiledPDFView that is currently front most.
@property (nonatomic, strong) TiledPDFView *tiledPDFView;
// The old TiledPDFView that we draw on top of when the zooming stops.
@property (nonatomic, strong) TiledPDFView *oldTiledPDFView;
// Current PDF zoom scale.
@property (nonatomic) CGFloat scale;
@property (nonatomic) CGPDFPageRef PDFPage;

-(void)replaceTiledPDFViewWithFrame:(CGRect)frame;

@end

如果我尝试获取或设置scale或PDFPagetiledPDFView

我收到了无法识别的错误:
 -[PDFScrollView tiledPDFView]: unrecognized selector sent to instance 0x7fd3d28dbc00
-[PDFScrollView tiledPDFView]: unrecognized selector sent to instance 0x7fd3d28dbc00
(null)

该类的一些细节:
@interface PDFScrollView : UIScrollView <UIScrollViewDelegate>

    @property (nonatomic) CGRect pageRect;
    @property (nonatomic, strong) UIView *backgroundImageView;
    @property (nonatomic, strong) TiledPDFView *tiledPDFView;
    @property (nonatomic, strong) TiledPDFView *oldTiledPDFView;

我认为是iOS11错误,如何解决?

最佳答案

我们有一个类似的问题。我们的例外是:
-[PDFPasswordViewController setPdfURL:]: unrecognized selector sent to instance 0x101479240
您不会相信这一点,但是我们将类名更改为以“PDF”开头的名称。

以前是PDFPasswordViewController,我们添加了一个前缀,类似于XXPDFPasswordViewController。就是这样,现在它可以像以前一样工作了。

老实说,我们不知道是什么原因造成的,但是我们认为这可能与iOS 11中引入的PDFKit有关。

10-08 04:16