Reputation: 1094
What name is better for the "delete" method that deletes document in database with given documentID?
1)
-(void) deleteDocumentWithID:(NSString *) documentID error:(NSError **)error;
or
2)
-(void) deleteDocumentByID:(NSString *) documentID error:(NSError **)error;
Upvotes: 1
Views: 727
Reputation: 22930
Have a look at Programming with Objective-C
By and with depends on you
-(void) deleteDocumentWithID:(NSString *) documentID error:(NSError **)error;
-(void) deleteDocumentByID:(NSString *) documentID error:(NSError **)error;
Upvotes: 2
Reputation: 2819
Your naming conventions are completely up to you, as mentioned in the apple doc try and be as descriptive as possible with your method names so any third party looking at your code (header file) will be able to get an idea quickly on what the method does. From the code you posted you are on the right track.
Have a look at this document.
Upvotes: 2