Voici une question rapide. Quel nom de méthode a le plus de sens pour une application Cocoa Objective-C?Quel nom de méthode correspond le mieux aux conventions Objective-C/Cocoa?
-(void) doSomethingWithAnimation:(BOOL)animated
ou:
-(void) doSomething:(BOOL)animated
ou même:
-(void) doSomethingAnimated:(BOOL)animated
Cela ne fonctionnera pas si bien si le parm animé vient d'ailleurs considérer ceci: - (void) doSomethingAnimated: (BOOL) anmimated { [self doSomethingElse: animation]; [otherView doAThirdThing: animé]; } devient un PITA si vous avez 2 méthodes différentes. –