Saturday 15 February 2014

class - What is 'id' in the following code? in Objective C -


I want to ask what is that ID? I do not know what this id is, I got this code from a book and it describes a common type that is used for any type of object. Can anyone help me with this? I've read it many times still can not find it.

  Zero shapes (id size [], integer number) {for (int i = 0; i    

id is an alias Unknown object-C object can be used to declare an Objective-C object value.

In the example, you have it using a id instead of a specific class so that the class of size does not depend on the code.

No comments:

Post a Comment