Information Technology Reference
In-Depth Information
It can be easy to miss Edit All in Scope. To use it, select any object and hover over it with the mouse cursor.
Xcode displays a floating selection triangle to the right of the property. Click the triangle, and Xcode displays a
right-click contextual menu with the Edit All in Scope entry (and nothing else), as shown in Figure 9.6.
FIGURE 9.6
Using Edit All in Scope is an easy way to rename a group of objects, but it's easy to miss this feature!
Select this entry, and Xcode highlights all instances of that object in the file. You can now type a new name, and
all instances of the name are changed at the same time. Press Return to make the change permanent or Escape
to cancel.
CAUTION
Don't use Edit All in Scope to change properties/ivars. If a symbol is accessed from outside a class, use one of the
refactor options to rename it.
Using Code Snippets
With earlier versions of Xcode, many developers realized that it was useful to create a dummy file with boiler-
plate code that could be copied into an active project. Xcode 4 replaces this ad hoc file with a code snippets
feature, creating a simple but productive new feature. Code snippets add complete sections of code to a project.
Xcode includes a small selection of default snippets, but you can expand the library with your own code.
 
Search WWH ::




Custom Search