这是参考iOS / OSX指南中的 Syncing Local Changes 示例,代码为:
PFQuery *query = [PFQuery queryWithClassName:@"GameScore"];
[query fromPinWithName:@"MyChanges"];
[[query findObjectsInBackground] continueWithBlock:^id(BFTask *task) {
NSArray *scores = task.result;
for (PFObject *score in scores) {
[[score saveInBackground] continueWithSuccessBlock:^id(BFTask *task) {
return [score unpinInBackground];
}];
}
}];
我的理解是它会占用标签MyChanges
下的所有对象并保存它们(如果需要,对吗?)。它是否也会通过deleteEventually()
正确删除我可能已标记为删除的对象?