According to Apple Doc:
"An instance method is a method whose execution is scoped to a particular instance of the class. In other words, before you call an instance method, you must first create an instance of the class. Instance methods are the most common type of method.
A class method is a method whose execution is scoped to the method’s class. It does not require an instance of an object to be the receiver of a message."
*So what really is "self" ? why it can receiver both class method and instance method ? So "before you call an instance method, you must first create an instance of the class" is wrong ? Example :
{ ...
[self method1];
//I'm doesn't create any instance of class//
[self method2];
}
-(void)method1 {
NSLog(@"this is a instance method");
}
+(void)method2 {
NSLog(@"this is a class method");
}