Class Documentation Pages
In the vast majority of cases, your target documentation page will be the documentation for a class. I have frequently spoken already of the importance of class documentation pages. A common move on your part will be to search on a class name in the documentation window. If you search on, say, NSString, the search result whose title is NSString Class Reference is the class documentation for NSString.
Let’s pause to notice the key features of a class documentation page. I’ll use UIButton as an example (Figure 8-1):
Figure 8-1. The start of a typical class documentation page
- Inherits from
Lists, and links to, the chain of superclasses. One of the biggest beginner mistakes is failing to read the documentation up the superclass chain. A class inherits from its superclasses, so the functionality or information you’re looking for may be in a superclass. You won’t find out about
addTarget:action:forControlEvents:from the UIButton class page; that information is in the UIControl class page. You won’t find out that a UIButton has a
frameproperty from the UIButton class page; that information is in the UIView class page.
- Conforms to
- Lists, and links to, the protocols implemented by this class. Protocols are discussed in Chapter 10. Fortunately, a class that conforms to a formal protocol usually lists that protocol’s required methods as links (though the methods ...