Information Technology Reference
In-Depth Information
Click on the disclosure triangle in the gutter. Xcode hides the selected code and replaces it with a placeholder
{…} graphic, as shown in Figure 9.2. To unhide the code, double-click the placeholder or click once on the dis-
closure triangle.
Code hiding selects paired curly brackets, so you can hide entire methods or specific code segments. If you hide
a complete method the signature remains. If you hide a smaller segment, such as the contents of an if state-
ment, the first line of the statement remains as a guide and the contents are hidden.
For convenience, you can also fold all of the code in a file. Select Editor⇒Code Folding and choose one of the
following options:
All: Folds/unfolds everything between two matching delimeters.
Methods & functions: Folds/unfolds methods and functions only.
Comment blocks: Folds/unfolds comment blocks only.
You can use this feature to hide the large comment block that Apple always includes at the start of sample code.
FIGURE 9.2
You can unhide code by clicking in the gutter or clicking the placeholder graphic.
Search WWH ::




Custom Search