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

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -