Property and Its Attributes in Objective-C
All the attributes of a property defines how the compiler generate the getter
and setter
accessors.
- atomic / nonatomic
- strong / weak: used for ARC.
- assign / retain / copy: go to here for reference. These properties define how the compiler generate the
setter
accessor. - readonly / readwrite: if a property is declared as
readonly
, the compiler will only declare the getter accessor, so that you can not call setter accessor.