0

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.

Josiah
  • 4,663
  • 2
  • 31
  • 49

2 Answers2

4

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.

Community
  • 1
  • 1
Sulthan
  • 128,090
  • 22
  • 218
  • 270
  • That's great! I didn't know that. I'll just get rid of the lines. Also, my class is quite big, but a lot of those properties is because I am obsessed with controlling the UI. I change almost every UI element. :) It's just one app and I have over 10 classes. Most are not nearly as big as this one though. – Josiah Jan 21 '13 at 15:39
1

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

hellozimi
  • 1,858
  • 19
  • 21