July 2010
Beginner
416 pages
9h 51m
English
In Objective-C, unlike Java or C++, classes are themselves objects. Objective-C classes are instances of a special class called Class. You can send classes messages and they can execute methods. This chapter looks at the technical details of class objects and class methods, and then takes a brief look at some examples of class methods. The last section of this chapter is an extended example where you’ll learn how to implement variables that are global to all instances of a given class.
Each class in an Objective-C program is represented by a single class object that contains the information that defines the class. You don’t have to do anything to instantiate class objects; the compiler creates them for you from ...