@protected in Objective-C

I have a simple class:

#import <UIKit/UIKit.h>
#import <CoreData/CoreData.h>

@interface MyTableViewController : UITableViewController
{
@protected
    NSFetchedResultsController *_fetchedResultsController;
}

One more thing:

#import <UIKit/UIKit.h>

@interface MyChildTableViewController : MyTableViewController
{
}

- (void)someMethod;

The problem is that I cannot use _fetchedResultsControllerin the class MyChildTableViewController. I get a compile-time error: "_fetchedResultsController" uneclared (first use in this function) `

What is wrong here?

+5
source share
2 answers

ughoavgfhw posted the correct answer in the comments. I asked him (also in the comments) to rewrite it as an answer so that I could accept it. But he did not. So I will post my own answer, just to close the question and remove it from the unanswered one.

:
C/C++ Compiler Version LLVM compiler 2.0 .

0

, self- > , .

-1

All Articles