+ (void)Foo;
- (void)Foo;
In the method, - (void)Foo, the keyword self means an instance of the class.
But in the method, + (void)Foo, What does the keyword self mean? Does it mean the Class ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
selfis one of the two implicit parameters to every method. It is a pointer to an object, and initially it is whatever object received the message to invoke the method that’s executing. When the method in question is an instance method,selfwill be an instance of the class in which the method is defined, or one of its subclasses. In the case of a class method,selfwill be the class object.