You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One ivar per line; don't declare multiple ivars using the comma.
Use empty lines to group ivars in logical chunks.
Never declare an ivar unless you need to change its type from its declared property.
Properties
Declare properties after ivars and before methods.
Prefer exposing an immutable type for a property if it being mutable is an implementation detail. This is a valid reason to declare an ivar for a property.
Always declare memory-management semantics even on readonly properties.
Declare properties readonly if they are only set once in -init.
Declare properties copy if they return immutable objects and aren't ever mutated in the implementation.
Don't use @synthesize unless the compiler requires it. As of LLVM 4.3 properties no longer to be @synthesize'd. However, optional properties in protocols must be explicitly @synthesize'd in order to exist.
One property per line; one @synthesize per line.
Methods
Start with class methods, followed by init methods.
Separate class methods from instance methods with an empty line.
Follow this style:
Start with - or + character
Space
Return type
Method name (no space between return type and this)
Colon
Parameter type (no space between colon and this)
Parameter name (no space between parameter type and this)