【发布时间】:2012-03-21 08:18:24
【问题描述】:
可能重复:
What exactly does @synthesize do?
Can someone explain this @synthesize syntax?
@interface Duck : NSObject {
NSArray *_feathers;
}
@property (nonatomic,retain) NSArray *feathers;
@end
@implementation Duck
@synthesize feathers=_feathers;
@end
我想知道你在做@synthesize feathers = _feathers 时到底发生了什么?
【问题讨论】:
-
你应该看看这个问题stackoverflow.com/questions/822487/…
-
开始阅读Objective-C 文档。恩尤其是关于properties的部分
-
除了 Apple 的文档之外,一些搜索可以帮助您 - 即使在这个站点中也是如此。就在昨天,我回答了同样的问题:stackoverflow.com/questions/9771434/…
标签: objective-c