Skip to content

Commit 554f7bf

Browse files
committed
Merge pull request kodecocodes#34 from icanzilb/master
Formatting fixes
2 parents e9ce91b + 74e389f commit 554f7bf

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Use `#pragma mark -` to categorize methods in functional groupings and protocol/
8282

8383
#pragma mark - Custom Accessors
8484

85-
- (void)setCustomProperty:(id)property {}
85+
- (void)setCustomProperty:(id)value {}
8686
- (id)customProperty {}
8787

8888
#pragma mark - IBActions
@@ -230,7 +230,7 @@ Local variables should not contain underscores.
230230

231231
In method signatures, there should be a space after the method type (-/+ symbol). There should be a space between the method segments (matching Apple's style). Always include a keyword and be descriptive with the word before the argument which describes the argument.
232232

233-
The usage of the word "and" is reserved. It should not be used for multiple parameters as illustrated in the initWithWidth:height: example below.
233+
The usage of the word "and" is reserved. It should not be used for multiple parameters as illustrated in the `initWithWidth:height:` example below.
234234

235235
**Preferred:**
236236
```objc
@@ -524,17 +524,17 @@ if (!error) return success;
524524

525525
### Ternary Operator
526526

527-
The Ternary operator, ? , should only be used when it increases clarity or code neatness. A single condition is usually all that should be evaluated. Evaluating multiple conditions is usually more understandable as an if statement, or refactored into instance variables. In general, the best use of the ternary operator is during assignment of a variable and deciding which value to use.
527+
The Ternary operator, `?:` , should only be used when it increases clarity or code neatness. A single condition is usually all that should be evaluated. Evaluating multiple conditions is usually more understandable as an `if` statement, or refactored into instance variables. In general, the best use of the ternary operator is during assignment of a variable and deciding which value to use.
528528

529529
Non-boolean variables should be compared against something, and parentheses are added for improved readability. If the variable being compared is a boolean type, then no parentheses are needed.
530530

531531
**Preferred:**
532532
```objc
533-
NSInteger a = 5;
534-
result = (a != 0) ? x : y;
533+
NSInteger value = 5;
534+
result = (value != 0) ? x : y;
535535

536-
BOOL a = YES;
537-
result = a ? x : y;
536+
BOOL isHorizontal = YES;
537+
result = isHorizontal ? x : y;
538538
```
539539

540540
**Not Preferred:**

0 commit comments

Comments
 (0)