Class - analogous to the typedef above; defines a complex data type and functions to operate on that data.
Instance of a class - analogous
to the pointer to the malloced memory above; each
instance of a class has its own memory. In this memory, the instance
stores the values of its "instance variables".
Instance variables - analogous to the fields of the struct. The memory allocated for each instance is used to store that instance's variables.
method - A "method" is a function associated with a class. A class may have any number of methods.
message - A "message" is how a method is invoked. In C, you invoke a function by using its name followed by parens. In Objective-C, you invoke a method by sending a message to an instance, using the following syntax:
[myInstance aMessage]; or [myInstance aMessageWithArg:arg]; or [myInstance aMessageWithArg:arg otherArg:arg2]; |
This causes the Objective-C run-time system to look at the class of myInstance, find the correct method for the given message, and invoke that method.