objective-c Attribute Properties (assign, retain, copy, ReadOnly, ReadWrite, Atomic, nonatomic)
The following article is reproduced from: http://blog.csdn.net/zhangao0086/article/details/6674460, this article is very thorough, not like other articles so vague, thank the author.
Document Address: Property Declaration Attributes section of the OBJECTIVE-C programming Language
Assign: Specifies the setter method with a simple assignment, which is the default action. You can use this property for scalar types, such as int. You can imagine a float, which is not an object, so it can't be retain, copy.
Retain: Specifies that the retain should be called on a later object, and the previous value sends a release message. You can imagine a nsstring instance, which is an object, and you might want to retain it.
Copy: Specifies that a copy of the object (deep copy) should be used, and the previous value sends a release message. Basically like retain, but without increasing the reference count, it is allocating a new piece of memory to place it.
ReadOnly: Only getter methods will be generated and no setter method is generated (getter methods do not have a get prefix).
ReadWrite: The default property will generate getter and setter methods with no extra parameters (the setter method has only one parameter).
Atomic: The default property for an object is that the Setter/getter generated method is an atomic operation. If there are multiple threads calling the setter at the same time, there will not be one thread executing the setter all the way before the other thread starts executing the setter, related to the method's tail and end lock.
Nonatomic: The atomicity of Setter/getter is not guaranteed, and data may be problematic in multithreaded situations.