non-tomic In principle, if you speak non-atomically and you generate accessors using @synthesize, then if several threads try to change / read a property at once, a problem may arise. You may receive partially written values ββor re-issued / saved objects, which can lead to crashes. (This is potentially much faster than an atomic accessory.)
atomic is the default behavior. nonatomic is thread safe. readonly Externally, the property will be read-only.
The readwrite property will have both an accessor and an installer.
Assign (default) . Indicates that the installer is using a simple assignment. Save . Indicates that the save should be called on the object at the destination. This attribute is valid only for Objective-C object types. (You cannot specify persistence for Core Foundation objects)
copy . Indicates that a copy of the object should be used for the assignment. A release message is sent to the previous value. Copy is performed by calling the copy method. This attribute is valid only for object types that must implement the NSCopying protocol.
iHS
source share