Categories

Download objective-c eBook

Syntax

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

  • // Method and property declarations

  • @end

Remarks

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.

Related Examples

Stats

129 Contributors: 11
Thursday, August 18, 2016
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook