Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In Objective-C, when you want an object to do something, you send the object a message, and in response, the object executes one of its methods. This is not quite the same thing as calling a function. Functions are usually statically bound—the code that the function executes is determined when the program is compiled. Using messaging, the actual code that is executed in response to a message is determined at execution time.
In this chapter, you will learn how Objective-C messaging works. The chapter covers methods, message expressions, and the machinery of the messaging system.