December 2012
Beginner
552 pages
12h 58m
English
As you start working with variables that can contain objects from different classes, you might need to ask questions such as the following:
• Is this object a rectangle?
• Does this object support a print method?
• Is this object a member of the Graphics class or one of its descendants?
You can then use the answers to these questions to execute different sequences of code, avoid an error, or check the integrity of your program while it’s executing.
Table 9.1 summarizes some of the basic methods that the NSObject class supports for asking these types of questions. In this table, class-object is a class object (typically generated with the class method), and selector is a value of type SEL (typically created with ...
Read now
Unlock full access