[email protected] What modifiers can be followed?
1. Literacy: ReadWrite: Readable writable, system for us to create this property setter and getter method ReadOnly: Read only, the system only for us to create a setter method 2.setter Related: Assign: direct copy, For basic data types (Nsinteger and cgfloat) and C data types (int, float, double, char, etc.) there is also an ID type this modifier does not involve memory management and is not available for object types, which can lead to memory leaks or error retain: Memory management for object types is not available for basic data types, and when used with object types, the setter method first assigns the object properties out, assigning a value once to the new object, and doing a retain operation. Copy: Mainly used for nsstring types, Indicates that the replication content system default property is Assign,retain is a copy of the pointer, copy is the replication of the content 3. Atomic atomic: Represents a thread-safe nonatomic: Represents non-thread-safe, and using this property improves some 4.getter and setter @property (getter = isOpen) BOOL Open;5.arc Strong: Similar to Retainweak: assign@synthesize PropertyName compiler will do one thing, Look for a member variable named _propertyname in the class member variable, and if not, continue looking for a member variable named PropertyName, if neither, the compiler will automatically generate a private member variable named _propertyname for us. Note that the automatic creation of the system is private. But you don't have to write after Xcode 4.5.
iOS face question Finishing