Information Technology Reference
In-Depth Information
Encapsulate: This works on properties. It creates code for a getter and/or a setter. You don't need to use
this feature if you're already using @synthesize for your properties.
FIGURE 9.5
Using the preview/confirmation dialog while renaming a class. Xcode searches every file in the project and lists
the possible edits here.
NOTE
Some of the refactoring options modify project nib files. You can confirm or cancel edits using the same split be-
fore/after view used to display code files, but the panes show the XML (eXtended Markup Language) data inside a
nib. This may appear unfamiliar if you've never looked inside a nib with a text editor. There's no way to view the
changes graphically; typically, it wouldn't make sense to show them in this way.
Using the Edit All In Scope feature
It's sometimes useful to rename symbols used in a file. You can use the global find/replace feature in the main
menu to rename a symbol in a project, but sometimes you need to limit the changes to a single class, method,
or function.
With the Edit All In Scope feature, you can rename one instance of a symbol, and your edit is copied to all
matching symbols within the selected scope. Typically you use this within a method or function, but you can
also use it to change local variables in a class.
Search WWH ::




Custom Search