I'm trying to declare properties that are for internal use only in a Private
category as such:
@interface BarLayer (Private)
@property (readwrite, retain) MenuItemFont *menuButton;
@property (readwrite, retain) Menu *menuMenu;
@property (readwrite, retain) LabelAtlas *messageLabel;
@end
Now I'm trying to figure out where exactly I'm supposed to @synthesize
those.
I tried:
@implementation BarLayer (Private)
@synthesize menuButton = _menuButton;
@synthesize menuMenu = _menuMenu;
@synthesize messageLabel = _messageLabel;
@end
Here, the compiler complains:
@synthesize not allowed in a category's implementation
So I tried putting it in my BarLayer
implementation, but here it doesn't find the declarations in the BarLayer
interface.
no declaration of property ‘menuButton’ found in the interface
What would the correct way be?
See Question&Answers more detail:os