2

Is there any possible way to fold some parts of my code in Xcode 4.2 ? I'm not asking for folding methods and statement blocks 'coz it's already supported in XCode.

EDIT: I have 100 lines of code that contain vars, math operations, if statements, switch blocks, etc. I want to fold these lines together.

jww
  • 97,681
  • 90
  • 411
  • 885
JAHelia
  • 6,934
  • 17
  • 74
  • 134

1 Answers1

2

I have 100 lines of code that contain vars, math operations, if statements, switch blocks, etc ... I want to fold these lines together.

For the if statements and blocks, you can follow the instructions at How to collapse all methods in XCode?.

If you are using Objective C, then you can instrument your code with a #pragma mark and it will be collapsible. A #pragma mark is a lot like a Visual Studio #region. See Can you set code regions in Xcode? for more details.

Community
  • 1
  • 1
jww
  • 97,681
  • 90
  • 411
  • 885