objective c - Cocoa -/+ declarations -
While declaring with cocoa / obj-c - what is the difference between - and +
example For - (zero) doSomething {} or + (zero) doSomething {}
" - "an example method (relative meaning of a specific object), while" + " Means a class method (which is normally usable by a class) -
Example:
For " - (zero) doSomething ":
MyCl Ass * obj = [[MyClass alloc] init]; [Obj doSomething]; versus
[MyClass doSomething]; " + (zero) doSomething " for .
Comments
Post a Comment