08-Objective-C special Syntax: @ property, @ synthesize 1. @ property is used in @ interface to automatically generate the setter (setter) and getter (constructor) declarations using @ property int age; you can replace the following code:-(void) setAge: (int) age; // setter-(int) age; // getter 2. @ synthesize is used in @ implementation to automatically generate setter (setter) and getter (constructor) implementations. @ synthesize age = _ age can replace the following code: -(void) setAge :( int) age {_ age = age;}-(int) age {return _ age;} if the member Variable _ age does not exist, the @ private Variable _ age is automatically generated (because _ age is declared in @ implementation, it is private) if it is @ synthesize age; in this case, specify the age to be implemented, if. if another age member variable with the same name is declared in the H file, its setter and getter will be implemented. Otherwise, an age variable will be automatically generated in @ implementation, if the setter and getter methods of age are manually implemented, the compiler automatically implements the getter method. If the getter method is manually implemented, compilation automatically implements the setter method. If both setter and getter are implemented at the same time, the compiler will not automatically generate nonexistent member variables. after Xcode4.4: feature @ property includes the @ synthesize function, that is, declare @ propery int age in @ interface; the compiler is in. the setter and getter methods are automatically generated in the hfile. By default, the member variables of underline _ age are accessed, @ proterty automatically generated member variables are protected by @ protect by default (because in. member variables declared in the H file. The default value is @ protect)