Objective C methods naming conventions -


what name better "delete" method deletes document in database given documentid?

1) -(void) deletedocumentwithid:(nsstring *) documentid error:(nserror **)error;

or

2) -(void) deletedocumentbyid:(nsstring *) documentid error:(nserror **)error;

have @ programming objective-c

  • method names not have prefix
  • method should start lowercase letter
  • camel case used multiple words
  • if method takes 1 or more arguments, name of method should indicate each parameter
  • error should last parameter method

enter image description here

by , depends on

 -(void) deletedocumentwithid:(nsstring *) documentid error:(nserror **)error;   -(void) deletedocumentbyid:(nsstring *) documentid error:(nserror **)error; 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -