Information Technology Reference
In-Depth Information
In previous versions of Xcode, the forward and back link features didn't always work correctly. Xcode 4 handles
forward and back linking much more successfully. The buttons in the bar at the top left of the documentation
viewer not only navigate between pages correctly, they also navigate between different items on the same page.
You can save time by using these buttons regularly.
TIP
The browser versions of the class references include a useful Table of Contents with direct links to each sec-
tion—Tasks, Properties, and so on—at the left of the window. The Xcode viewer doesn't display these links in the
document area, but you see them if you click the reveal triangle next to a class reference while browsing. They
don't appear in search results.
Accessing documentation from code
The documentation browser is ideal for general background searches and for browsing support documents.
While coding, you typically want to find the documentation for classes, methods, and other symbols as quickly
as possible.
The search feature in the browser is an inefficient way to do this. Xcode includes three faster options:
Quick Help
Command-click
Option-click
Using Quick Help
When the Utilities pane is open at the right, you can display a Quick Help tip for any symbol by clicking it.
When the symbol is part of the OS, the tip includes live links to the documentation. For example, if you select a
class and click to the right of the Reference item, Xcode opens the documentation browser—if it isn't already
open—and displays the class reference.
This feature is Xcode's version of contextual help. In addition to reference and definition links, it also lists re-
lated APIs, related documents, and useful sample code. You can use it for a bottom-up, in-depth exploration of
any symbol. This is almost always more efficient and productive than top-down browsing. It's also a quick way
to check method parameters.
TIP
Quick Help works as you type. As soon as Xcode recognizes a class, the Quick Help window displays the relevant
links. This feature is more obvious and more useful on faster Macs, because the help content appears almost in-
stantly.
Using command-click
If you command-click a symbol, Xcode jumps directly to the symbol definition. If the symbol is defined in a
framework, Xcode displays the corresponding item in the framework header file. This feature is identical to the
Jump to Definition feature described in Chapter 9—but quicker and more intuitive.
Search WWH ::




Custom Search