Created
August 3, 2014 04:12
-
-
Save fisherds/11c237ecc4480459c4e2 to your computer and use it in GitHub Desktop.
Endpoints iOS function used to Delete a MovieQuote
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (void) _deleteQuote:(NSString*) entityKeyToDelete { | |
| // Make a query object | |
| // Use the service to execute the query | |
| // Use a callback block to handle the response | |
| GTLQueryMoviequotes* query = [GTLQueryMoviequotes queryForMoviequoteDeleteWithEntityKey:entityKeyToDelete]; | |
| [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; | |
| [self.service executeQuery:query completionHandler:^(GTLServiceTicket* ticket, | |
| GTLMoviequotesMovieQuote* returnedMovieQuote, | |
| NSError* error) { | |
| [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; | |
| if (error != nil) { | |
| [self _showErrorDialog:error]; | |
| return; | |
| } | |
| // Delete worked. Good for us. Already done with delete on client so do nothing. | |
| // Don't do a queryForQuotes now. It looks weird when the screen is in edit mode (the video chose poorly). | |
| }]; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment