
iphone基础知识
zani515
这个作者很懒,什么都没留下…
展开
-
id foo1, NSObject *foo2和id<NSObject> foo3区别
id foo1; NSObject *foo2; id<NSObject> foo3; The first one is the most common.It simply declares a pointer to some Objective-C object (see /usr/include/objc/objc.h). id gives the...原创 2011-08-11 15:49:40 · 166 阅读 · 0 评论 -
delegate和protocol
转自:http://haoxiang.org/2011/08/ios-delegate-and-protocol/ protocol和delegate完全不是一回事,放在一起说,只是因为我们经常在同一个头文件里看到这两个word。 protocol和java里interface的概念类似,是Objective-C语法的一部分。定义protocol如下 @protocol Cla...原创 2011-12-23 09:14:54 · 83 阅读 · 0 评论 -
NSNull作用
Directly from Apple: "The NSNull class defines a singleton object you use to represent null values in situations where nil is prohibited as a value (typically in a collection object such as an array o...原创 2012-02-03 15:25:17 · 110 阅读 · 0 评论