Objective-C Language Categories


  • @interface ClassName (categoryName) // ClassName is the class to be extended

  • // Method and property declarations

  • @end


To avoid method name clashes, it is recommended to use prefixes (like xyz_ in the example). If methods with the same name exist, it is undefined which one will be used in the runtime.