The Source Editor
Although you’ll explore the depths of the Source Editor in Part II, there are a couple of useful ways to find contextual help from within your code.
Quick Help in the Utility Area
As you saw in Chapter 3, Xcode’s Utility area gives you access to various properties, code snippets, user interface elements for Interface Builder, and Quick Help. The Quick Help utility continuously updates its content depending on what you’ve selected in the Source Editor.
To get a feel for this utility, make sure your TestApp project is open and then select the TestAppAppDelegate.m source file from the Classes group in the Project navigator. Open the Utility area, and select the Quick Help utility. In the Source Editor, click window in the @synthesize window; statement. Quick Help responds by showing you the name of the symbol (window) and the header file in which it is declared (the TestApp project’s TestAppAppDelegate.h file).
For a more interesting example, scroll down a bit until you find the – (NSString *) applicationSupportDirectory method, and click the NSString symbol. Quick Help responds by showing a much more detailed description of the NSString class (Figure 4.4), which is part of the Cocoa frameworks and is documented by the built-in document libraries. Any text highlighted in blue is a hyperlink to the corresponding documentation. Clicking a Quick Help hyperlink opens the linked information in the Documentation section of the Organizer.
Figure 4.4 The Quick Help utility
Search Documentation for Selected Text
Another handy way to find the documentation for symbols such as NSString is to select the symbol in the Source Editor and then choose Help > Search Documentation for Selected Text from the main menu. As with hyperlinks in the Quick Help pane, choosing this option will open any corresponding documentation it finds in the Documentation section of the Organizer.