开发者

Xcode -- moving a variable and associated property from one class to another

开发者 https://www.devze.com 2023-01-23 04:13 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消