草庐IT

synthesese

全部标签

objective-c - 使用@property 和@synthesese?

我想知道@property和@synthesese的意义何在。目前我使用以下声明://Class.m#import"Class.h"CCNode*node;@implementation//init,etc..但我看到其他人使用:@property(nonatomic,etc..)CCNode*node;@synthesise(nonatomic,etc..)node;//Iamnottoosureonhowthistypeofdeclarationworks,pleasecorrectmeonhowit'sdone.它们的工作方式似乎相同,@property和@synthesese方