This is more of a complaint than a question, although perhaps someone has some good points. So, basically, if you want ivar in your Objective-C class to have helper methods, you should mention it 3 times
SomeClass* _ivar;
@property (nonatomic,retain/assign/copy) SomeClass* ivar;
@synthesize ivar = _ivar;
and possibly the 4th time in the dealloc method. So it would not be more convenient if this approach was similar to Java-style annotations - in one place before the actual ivar declaration, just something like:
@property (nonatomic,retain,synthesize = ivar,dealloc) SomeClass* _ivar;
this also generates access methods, and dealloc to release the ivar in the dealloc method.
source
share