22 Class Extensions
So far, you have declared all of your properties, instance variables, and methods in the class header file. The header is where a class advertises its properties and methods so that other objects will know how to interact with it.
However, not every property or method should be advertised in a class’s header. Some properties or methods may only be intended for use by the class or instances of the class. Such internal details are better declared in a class extension. A class extension is a set of declarations that is private. Only the class or instances of the class are able to use the properties, instance variables, or methods declared in a class extension.
For example, the officeAlarmCode property of BNREmployee ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access