做事:忌浮忌躁

道听途说不可全信

iOS 中函数和方法的区别

iOS 中函数和方法的区别 (function method)

主要两种认识:

A method is on an object.
A function is independent of an object.
For Java, there are only methods.
For C, there are only functions.
For C++ it would depend on whether or not you’re in a class.
很多人支持这种说法,就是方法是对象的,而函数是独立于对象的
Objective-C是类似C++的

函数和方法并没有区别只是叫法不一样

[引用]http://stackoverflow.com/questions/155609/difference-between-a-method-and-a-function
[引用]http://bbs.itheima.com/thread-138029-1-1.html

阅读更多
文章标签: 方法 ios 函数
个人分类: iOS
上一篇clang、gcc、LLVM
下一篇OS X wants to make changes. Type an adminisstrator’s name and password to allow this. os x wants to
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭