开发者

Does XCode 4 Support Regions & What are your methods for code management?

Im aware that Xcode 3 never supported Regions, But im unsure if Xcode 4 does, wondering if anyone knew.

Regions are 开发者_Go百科helpful for ordering code and keeping it clean and manageable, they're supported in .NET C# IDEs and are usually accessable using #region and #endregion (If i recall correctly).

If not, is there any other way for managing code?

Any Tips, Techniques, or advice would be fantastic!

Oliver.


Xcode (both 3 & 4) does support code folding - that is, the ability to visually collapse a section of code into one line - but it's based on blocks defined by the syntax of the code itself, not on specially-marked regions. So you can collapse classes, methods, loops, if blocks, etc. Look to the left of your code, at the vertical stripe that appears in various shades of gray. Mousing over that stripe will highlight a section of code; clicking will then fold that section.

Xcode's 4's "symbol navigator" pane also offers a tree view of your project that displays classes, methods, properties, and instance variables hierarchically.

You can also use (in both 3 & 4) #pragma mark SectionName to add section markers to the symbol list that appears at the top of editor windows.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜