I would like to define a C struct-like in my Objective-C header file which includes _ivars only, however, since this a header file only there would be no corresponding @implementation. Is that even possible?
(I also don't want to force the header file includers to add @implementation since this is a simple descriptor definition)
I would like it to be @interface definition so users who like to extend it and add more data members to it could do so (again, only _ivars). However, other suggestions might work if you think of something.
Yes, there has to be an
@implementationdeclared for the class that is compiled by the compiler to cause the class to be realized at runtime (including the storage backing the@propertydeclarations.Once compiled, that class cannot extended with additional
@propertiesthat are automatically backed (it can be extended via categories, but you're on your own for storage and categorical extensions of classes is generally not recommended anyway).