Question

Let me start by saying I am not sure if this belongs here or at Super User. I started here.

Now, I am a very tidy person, and I like collapsing methods so that I can get around very easily. However, one thing that aggravates me is that all my @synthesize commands are always there. I can see no way to collapse them. (I have over 50 properties to synthesize) Is there a way I can hide these commands, while not messing up my build.

Thanks.

Was it helpful?

Solution

Unfortunately, from "available features" perspective, XCode is a very old IDE. Therefore no foldable code regions - see detailed discussion Xcode regions

Also note that with the latest compiler (LLVM 4.0), declaring @synthesize is optional. You can enable/disable it in compiler settings in your project settings. However, if you are using GCC or an older LLVM version (for whatever reasons), this is not possible.

Edit: After rereading your question... having 50 properties in one class smells very bad. Consider splitting your class into several smaller classes.

You can also put the @synthesize commands to the end of the @implementation file.

OTHER TIPS

Since Xcode 4.4 you don't need to @synthesize properties if you don't want another name for it — it uses auto synthesise.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top