我有以下设置
@interface PMObject : PFObject <PFSubclassing>
@property (nonatomic, strong) PMUser *creator;
---
@interface PMUser : PFUser <PFSubclassing>
@property (nonatomic, strong) PMObject *currentObject;
从this question阅读类似的问题我以下列方式保存新的PMObject:
PMObject *object = [PMObject object];
[object setCreator:[PMUser currentUser]];
[object saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
if(succeeded){
[[PMUser currentUser] setCurrentObject:object];
//this point is reached as expected
[[PMUser currentUser] saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
//this point is never reached ?
}];
}
}];
无论这看起来多么明显,它都没有按预期工作。很乐意为您提供帮助!