0
我無法從我的ContentViewController訪問我的ReaderControllerView的CGPDFPageRef和CGPDFDocumentRef。我在頭文件中這樣宣稱他們@public
下:無法訪問ivar CGPDFPageRef
@interface ReaderContentPage : UIView{
@public
CGPDFDocumentRef _PDFDocRef;
CGPDFPageRef _PDFPageRef;
我嘗試訪問他們像這樣:
ReaderControllerView *theReader = [ReaderControllerView alloc]init];
theReader._PDFPageRef //OR
theReader._PDFDocRef
它不會出現。但是,我可以毫無問題地訪問其他iVar。所以它真的讓我感到困惑,爲什麼我不能訪問這兩個變量。任何人都能告訴我爲什麼?謝謝。
大聲笑是啊,他必須要麼輸入它錯了,或有概念錯誤..! –