Possible Duplicate:
What do the plus and minus signs mean in Objective C next to a method?
I was confused between -(type) and +(type) in class.
@interface Class:Something{
+(id) foo;
-(void) fooAgain;
}
+(type) is class level function ( according to google)
but I don’t understand the meaning of class level function.
Inside +(id)foo is kind of {return some value}
I think it is similar to getter or setter but somehow it must be different.
(because @property refers to getter/setter)
Can anybody explain simply? Thanks
Class methods should be called using the class name itself. And, the instance methods should be called using instances of the class.
So, you have to call the above methods from some other classes, like the following,
The class method:
The instance method: