This is because you create your empty category in your implementation file, and not in the header file, so that other classes cannot access it.
//TestClass.h @interface TestClass : NSObject { } -(void)publicMethod; @end //TestClass.m @interface TestClass() -(void)privateMethod; @end @implementation TestClass -(void)publicMethod { NSLog (@"public"); } -(void)privateMethod { NSLog (@"private"); } @end
TheAmateurProgrammer
source share