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.
The structure of an Objective-C method is very similar to that of a C function (in fact, the compiler eventually turns the methods into C functions). ...