Skip to main content
Code Review

Return to Answer

Commonmark migration
Source Link

###Indent your code.

Indent your code.

###Don't abuse vertical white space.

Don't abuse vertical white space.

###Don't leave completely empty methods in your code.

Don't leave completely empty methods in your code.

###Methods that only call super are the same as nothing.

Methods that only call super are the same as nothing.

###Don't leave in commented out code.

Don't leave in commented out code.

###Don't use UIAlertView.

Don't use UIAlertView.

###On using literals...

On using literals...

###Use properties. Or don't.

Use properties. Or don't.

###Indent your code.

###Don't abuse vertical white space.

###Don't leave completely empty methods in your code.

###Methods that only call super are the same as nothing.

###Don't leave in commented out code.

###Don't use UIAlertView.

###On using literals...

###Use properties. Or don't.

Indent your code.

Don't abuse vertical white space.

Don't leave completely empty methods in your code.

Methods that only call super are the same as nothing.

Don't leave in commented out code.

Don't use UIAlertView.

On using literals...

Use properties. Or don't.

edited body
Source Link
nhgrif
  • 25.4k
  • 3
  • 64
  • 129
- (void)someMethod {
 if (someCondition) {
 for (Foo *foo in ArrayOfFoosarrayOfFoos) {
 // this is an example of proper indentation
 }
 }
}
- (void)someMethod {
 if (someCondition) {
 for (Foo *foo in ArrayOfFoos) {
 // this is an example of proper indentation
 }
 }
}
- (void)someMethod {
 if (someCondition) {
 for (Foo *foo in arrayOfFoos) {
 // this is an example of proper indentation
 }
 }
}
added 473 characters in body
Source Link
nhgrif
  • 25.4k
  • 3
  • 64
  • 129

###Use properties. Or don't.

You've created this property:

@property (nonatomic, strong) AVAudioPlayer *audioPlayer;

Yet you repeatedly access the backing variable directly:

_audioPlayer

Rather than going through the accessors:

self.audioPlayer

If you're going to create a property, use the accessors. If you're not going to use the accessors, don't create it as a property--just create it as an instance variable.


###Use properties. Or don't.

You've created this property:

@property (nonatomic, strong) AVAudioPlayer *audioPlayer;

Yet you repeatedly access the backing variable directly:

_audioPlayer

Rather than going through the accessors:

self.audioPlayer

If you're going to create a property, use the accessors. If you're not going to use the accessors, don't create it as a property--just create it as an instance variable.

Source Link
nhgrif
  • 25.4k
  • 3
  • 64
  • 129
Loading
lang-c

AltStyle によって変換されたページ (->オリジナル) /