Created
January 3, 2016 14:38
-
-
Save tranhieutt/053cf1f469d36c55d1aa to your computer and use it in GitHub Desktop.
Delete object in class of Parse.com
This file contains 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)deleteAccessory:(HondaDataItem *)hondaDataItem withCompletion:(void(^)(BOOL success))completion failure:(void(^)(HondaFailureCode failureCode))failure{ | |
PFObject *hondaItem = [PFObject objectWithClassName:@"HondaItem"]; | |
hondaItem.objectId = hondaDataItem.objectId; | |
// multi delete | |
// [PFObject deleteAllInBackground:@[object1, object2, object3]]; | |
[hondaItem deleteInBackgroundWithBlock:^(BOOL succeeded, NSError * _Nullable error) { | |
if (succeeded) { | |
// The object has been saved. | |
completion(succeeded); | |
} else { | |
// There was a problem, check error.description | |
} | |
}]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment