Questions
When adding new properties to classes, I find myself typing the same things over and over in xcode:
- add TYPE *NAME; (in .h interface)
- add @property (nonatomic, retain) TYPE *NAME; (in .h)
- add @synthesize NAME; (in .m)
- add [NAME release]; (in .m dealloc)
(I m in a non-garbage collected environment.)
How can I do this automatically?
Answers
That sounds about right. IIRC, the Objective-C 2.0 doc says you might be able to leave out step #1, but otherwise I don t know of any shortcuts.
http://www.mactech.com/articles/mactech/Vol.23/23.01/2301XCode/index.html
http://www.mactech.com/articles/mactech/Vol.23/23.01/2301XCode/index.html
Source
License : cc by-sa 3.0
http://stackoverflow.com/questions/111517/how-can-i-automatically-add-properties-in-objective-c
Related