Objective C uses a special keyword ‘id’.
Let’s see what it is.
Objective C -id- is actually a ‘pointer to an object’. That is ‘id’ can hold a pointer to any objective c object. It doesn’t matter the object’s class.
NSString *myString = @"Coderz Heaven!"; id newString; NSString *tempString; newString=myString; tempString=newString;
That’s it! It will work out with using ‘id’ keyword. Compiler simply thinks ‘you know what you are doing!’
A word of caution : Remember not to use * while creating id objects! Because that type already know it’s a pointer!