2012-06-21 18 views
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。所以它真的讓我感到困惑,爲什麼我不能訪問這兩個變量。任何人都能告訴我爲什麼?謝謝。

回答

1

你宣佈CGPDFDocumentRef _PDFDocRef; CGPDFPageRef _PDFPageRef這些變量在ReaderContentPage類中,並嘗試通過創建ReaderControllerView類的對象來訪問它們類怎麼可能?

+0

大聲笑是啊,他必須要麼輸入它錯了,或有概念錯誤..! –