【发布时间】:2014-11-28 01:28:16
【问题描述】:
如果一个已经在运行,我怎么能忽略新的提取。这是我的代码的一个示例: 因此,如果我调用 [self getParticipants] 如何确保已在运行时忽略。我唯一的解决方案是创建 BOOL 属性“inMiddleOfFetching”,但我不想为此创建另一个 BOOL 属性。有没有更好的解决方案?
- (void)getParticipants {
PFQuery *participantsQuery = [self.participantsRelation query];
[participantsQuery includeKey:@"client"];
[participantsQuery findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if (objects)
self.participants = objects;
}];
}
【问题讨论】:
标签: ios parse-platform objective-c-blocks