Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Unless explicitly contradicted below, assume that all of Apple's guidelines appl
* Tabs, not spaces.
* End files with a newline.
* Make liberal use of vertical whitespace to divide code into logical chunks.
* Don’t leave trailing whitespace.
* Not even leading indentation on blank lines.

## Documentation and Organization

Expand Down Expand Up @@ -57,12 +59,12 @@ Unless explicitly contradicted below, assume that all of Apple's guidelines appl
* Declare properties `copy` if they return immutable objects and aren't ever mutated in the implementation. `strong` should only be used when exposing a mutable object, or an object that does not conform to `<NSCopying>`.
* Instance variables should be prefixed with an underscore (just like when implicitly synthesized).
* Don't put a space between an object type and the protocol it conforms to.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an example of what I am sick of seeing in diffs.

```objc
@property (attributes) id<Protocol> object;
@property (nonatomic, strong) NSObject<Protocol> *object;
```

* C function declarations should have no space before the opening parenthesis, and should be namespaced just like a class.

```objc
Expand Down Expand Up @@ -108,7 +110,7 @@ for (int i = 0; i < 10; i++) {

## Control Structures

* Always surround `if` bodies with curly braces if there is an `else`. Single-line `if` bodies without an `else` should be on the same line as the `if`.
* Always surround `if` bodies with curly braces if there is an `else`. Single-line `if` bodies without an `else` should be on the same line as the `if`.
* All curly braces should begin on the same line as their associated statement. They should end on a new line.
* Put a single space after keywords and before their parentheses.
* Return and break early.
Expand Down