I\'m trying to declare properties that are for internal use only in a Private category as such:
@interface BarLayer (Private)
@property (readwr
Actually, with the latest LLVM compiler, this problem can be solved much better. The previously recommended method to hiding as much about your properties as possible was to declare your variables in your .h, prefix them with an _, declare a property in a class extension in the private .m, and @synthesise that property in your @implementation.
With the latest LLVM (3.0), you can go farther yet, hiding everything about your property, including the backing ivar. Its declaration can be moved to the .m and even omitted there as well in which case it will be synthesized by the compiler (thanks Ivan):
Car.h:
@interface Car : NSObject
- (void)drive;
@end
Car.m:
@interface Car ()
@property (assign) BOOL driving;
@end
@implementation Car
@synthesize driving;
- (void)drive {
self.driving = YES;
}
@end