November 2013
Beginner
325 pages
9h 47m
English
When declaring a pointer to hold the address of an object, most of the time you specify the class of the object that the pointer will refer to:
NSDate *expiration;
However, often you need a way to create a pointer without knowing exactly what kind of object the pointer will refer to. For this case, you use the type id to mean “a pointer to some kind of Objective-C object” Here is what it looks like when you use it:
id delegate;
Notice that there is no asterisk in this declaration. id implies the asterisk.
Read now
Unlock full access