When writing c#, in Visual Studio, you can set regions to group code accordingly. Being new to Xcode I can't seem to find a similar feature.
+5
A:
Using Xcode editor, you can collapse or expand any block of code by clicking in the little left margin. Moreover, you can put a mark in any point in the code with:
#pragma mark
your title as long as you want
Your mark will then appear in the middle popup menu on top of the editor window.
Update: I have found that a duplicate of this question exists here. The answers may be of interest.
mouviciel
2009-02-22 14:39:49
That is similar, but not quite the same. Regions have start and end points you can also collapse and expand.
Ferdeen
2009-02-22 15:26:50
the #pragma mark doesn't seem to do the same thing. But it's better than nothing. Thanks.
Ferdeen
2009-02-22 15:27:29
Yes, since Xcode does not implement #region, I've tried to find something similar.
mouviciel
2009-02-22 15:37:55
no need to be pragmatic I need to know what's right. Thanks and thanks for the screen shot.
Ferdeen
2009-02-22 19:19:04
+4
A:
You can also use:
// MARK: -
or
// MARK: Initialization
which is more portable than #pragma mark.
0xced
2009-02-24 10:01:00