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;
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.
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;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.