4:28 PM
Unlike regular categories, a class extension can add its own properties and instance variables to a class. If you declare a property in a class extension, like this: @interface XYZPerson () @property NSObject *extraProperty; @end
4:29 PM
↑これでヘッダーに載せないフィールドが書ける
4:29 PM
It’s also possible to use a class extension to add custom instance variables. These are declared inside braces in the class extension interface: @interface XYZPerson () { id _someCustomInstanceVariable; } ... @end