Information Technology Reference
In-Depth Information
To make code structures easier to follow, you can change the fonts and colors used by Xcode. Although the
changes are cosmetic, they can have a significant impact on productivity, because a good color scheme can make
structures stand out clearly. Select Xcode Preferences, and choose the Fonts & Colors tab. You can change the
font globally by selecting every item that appears in the list and choosing a new font or font size in the Font box.
Refactoring Code
The Structure menu is used for relatively simple edits, but the Refactor menu, shown in Figure 9.4, can create
more complex changes. Some changes affect every file in a project.
FIGURE 9.4
In the Refactor menu, some or all of the options typically are grayed out.
Refactoring is a powerful but sometimes tricky feature that changes or renames structural features in your pro-
ject. The aim of refactoring is to create clearer organized code that is easier to extend and maintain. Edits
shouldn't change basic behavior or introduce bugs. You can refactor code with the options shown in the Refact-
or menu. You also can use a feature called Edit All In Scope to rename symbols within a file.
Using the Refactor menu
In Xcode, you can use the Refactor menu to do the following:
Rename classes, methods, and other symbols within a class
Rename classes, methods, and symbols across a project
 
Search WWH ::




Custom Search