简体   繁体   English

Objective-C方法类型

[英]Objective-C Method Types

I'm just starting to teach myself objective-c and attempting to learn the cocoa touch frameworks, as like many people recently I have developed an interested in a certain little multi-touch device. 我刚刚开始自学Objective-C,并尝试学习可可触摸框架,就像最近我对许多小型多点触摸设备产生了兴趣一样。

Anyway, I'm following the Stanford tutorials and I have couple of Objective-C books that im starting to make my way through. 无论如何,我正在学习斯坦福大学的教程,并且有几本关于Objective-C的书,这些书使我开始学习 While completing one of the assignments produced by stanford, I ended up looking at the array documentation and noticed this: 在完成斯坦福大学完成的一项作业时,我最终查看了阵列文档,并注意到了这一点:

http://i32.tinypic.com/2we992r.png

Some methods have + 's and some have - 's. 有些方法带有+,有些带有-。 Whats the difference? 有什么不同? I swear i've read what it is somewhere else before but can't for the life of me remember. 我发誓我之前已经读过其他地方的内容,但我一生都无法记住。

A minus signifies an object instance method, a plus signifies a class method - known in other languages as a ' static method '. 减号表示对象实例方法,加号表示类方法-在其他语言中称为“ 静态方法 ”。

More info on method types can be found in this wikipedia article . 有关方法类型的更多信息, 请参见此Wikipedia文章

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM