Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- + (void)removeResponse:(PSResponse *)response {
- [MagicalRecord saveWithBlockAndWait:^(NSManagedObjectContext * _Nonnull localContext) {
- PSResponse *resp = [PSResponse MR_findFirstByAttribute:@"responseId" withValue:[NSString stringWithFormat:@"%zd", response.responseId]];
- for (PSAnswer *answer in resp.answers) {
- [answer MR_deleteEntityInContext:localContext];
- }
- resp.responseStateRaw = kResponseStateDeleted;
- }];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement