关于objective-c类中为何要这样写?
@interface Person : NSObject
{
NSString *_name;
}
@property (copy) NSString *name;
@end
@implementation Person
@synthesize name=_name;
@end
我不明白和下面这样写有何区别?
@interface Person : NSObject
{
NSString *name;
}
@property (copy) NSString *name;
@end
@implementation Person
@synthesize name;
@end
小鼻涕噶儿
11 years ago