Blog

Xcode Refactorings

I just created yet another class with some instance variables and so missed the functionality of creating accessor methods for these instvars automatically. As I never really looked into the Refactorings of Xcode 3 I didnโ€™t notice that they provide an encapsulation refactoring. Using this on an instvar nicely generates accessor methods. You have to apply it to all your instvars separately, but still itโ€™s a great gain.

One thing they should improve though: why is the refactor command no submenu which shows all the available refactorings? This way the refactoring could be chosen much simpler.

Karsten

Comments

Nikita Zhuk โ€” September 28th, 2008 at 10:30

Or you could just use ObjC 2.0 properties and @synthesize your accessors ๐Ÿ™‚

Chris Hanson โ€” October 3rd, 2008 at 10:08

Sounds like a great enhancement request for bugreport.apple.com! ๐Ÿ™‚

Karsten โ€” October 3rd, 2008 at 11:59

doneโ€ฆ6267262. ๐Ÿ˜‰