I'm creating a category over NSDate. It has some utility methods, that shouldn't be part of the public interface.
How can I make them private?
I tend to use the "anonymous category" trick when creating private methods in a class:
@interface Foo()
@property(readwrite, copy) NSString *bar;
- (void) superSecretInternalSaucing;
@end
@implementation Foo
@synthesize bar;
.... must implement the two methods or compiler will warn ....
@end
but it doesn't seem to work inside another Category:
@interface NSDate_Comparing() // This won't work at all
@end
@implementation NSDate (NSDate_Comparing)
@end
What's the best way to have private methods in a Category?
@implementation
of the class extension must be in the primary@implementation
block of the class. – Heidt