【发布时间】:2010-11-03 15:39:10
【问题描述】:
我知道在访问属性的 setter / getter 方法时,我应该使用 [self setThisValue:@"a"]; 而不是 thisValue = @"a"; 但是通过下面的示例,我可以看到添加自我文档,我正在向 iVar 属性发送消息而不是不是局部作用域的变量,但在这种情况下它还有什么作用吗?
@interface CustomController : UIViewController {
NSMutableArray *foundList;
}
@property(nonatomic, retain) NSMutableArray *foundList;
@end
.
[[self foundList] addObject:eachObject]; // I usually write this ...
或
[foundList addObject:eachObject];
加里。
【问题讨论】:
标签: iphone objective-c cocoa-touch