Xcode -- moving a variable and associated property from one class to another
I find myself doing this pretty开发者_高级运维 often. Currently I am cut/pasting the variable declaration, the property, the @synthesize, and usually also the release call in the dealloc method. That's four copy and pastes. Is there an easy way to do all of that at once.
There's not an automated to do this per se, however this article by Matt Gallagher has a user script you can use to add the @property
, @synthesize
, and -release
lines from a given ivar. This should alleviate some of your pain.
http://cocoawithlove.com/2008/12/instance-variable-to-synthesized.html
精彩评论