gpt4 book ai didi

objective-c - 无法访问 ivar CGPDFPageRef

转载 作者:行者123 更新时间:2023-11-29 04:35:18 26 4
gpt4 key购买 nike

我无法从 ContentViewController 访问 ReaderControllerView 的 CGPDFPageRef 和 CGPDFDocumentRef。我在头文件中的 @public 下声明了它们,如下所示:

@interface ReaderContentPage : UIView{
@public
CGPDFDocumentRef _PDFDocRef;
CGPDFPageRef _PDFPageRef;

我尝试像这样访问它们:

ReaderControllerView *theReader = [ReaderControllerView alloc]init];

theReader._PDFPageRef //OR
theReader._PDFDocRef

它不会显示。不过,我可以毫无问题地访问其他 iVar。所以这真的让我很烦恼为什么我不能访问这两个变量。谁能告诉我为什么?谢谢。

最佳答案

您声明CGPDFDocumentRef _PDFDocRef; CGPDFPageRef _PDFPageRef ReaderContentPage中的这些变量类并尝试通过创建 ReaderControllerView 的对象来访问它们类怎么可能?

关于objective-c - 无法访问 ivar CGPDFPageRef,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11135904/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com