object-c 中@synthesize的用途

object-c 中@synthesize的用处In your class implementation, you can use the?@synthesize?compiler dire

object-c 中@synthesize的用处

In your class implementation, you can use the?@synthesize?compiler directive to ask the compiler to generate the methods according to the specification in the declaration:

@synthesize flag;
@synthesize nameObject;
@synthesize rootView;

You can combine the?@synthesize?statements in a single line if you want:

@synthesize flag, nameObject, rootView;