explains the meaning of the modifier in parentheses behind the property :
Nonatomic Non-thread-safe non-atomic operation is characterized by high efficiency of operating variables
Atomic Thread -safe atomic Operation is characterized by low efficiency of operating variables
//
The retain strong reference instance variable , that is, The setter method will have:
-(void) setxxx: (XXX) arg
// {
[_ Property name release];
_ Property name = [arg retain];
// }
and the class needs to override the Dealloc method
All other class objects that are not OC strings are used retain
//
Copy copy, that is, The setter method will have :
-(void) setxxx: (XXX) arg
// {
[_ Property name release];
_ Property name = [arg copy];
// }
and the class needs to override the Dealloc method
the object used by copy is : OC string, block
//
Assign direct assignment, that is, The setter method will be :
-(void) setxxx: (XXX) arg
// {
_ Property name = arg;
// }
data types that apply to all non-objects : int float, char, struct
Union, Void *, SEL, CLASS BOOL enumeration
ReadOnly does not provide setter methods , limit instance variables cannot be externally modified
************************************************
Dot syntax
@class person;
Person *person = [[Person alloc] init];
Person.name = @ "Haiyan";//Setter method
NSString *love = person.name; Getter method
End
OBJECTIVE-C series [email protected]& DOT Syntax