Property Modifiers

  • Use this syntax to use a differently-named instance variable:

    @implementation YourClass
    @synthesize propertyName = instanceVariableName;
    @end
    
  • An init method should assign self to the result of calling the superclass’s initialization method before doing its own initialization. A superclass may fail to initialize the object correctly and return nil so you should always check to make sure self is not nil before performing your own initialization.

Defaults

  • The default property modifiers (post-ARC) are: (strong, atomic, readwrite), so these are equivalent:
@property NSArray *name;
@property (strong, atomic, readwrite) NSArray *name;

References

Edit