0
다음과 같이 구문 분석 데이터베이스에서 모든 "음식"개체를 검색해야하는 함수가 있습니다. 그러나 실제 데이터베이스에는 현재 249 개의 개체가 있지만 블록은 100 개의 개체 만 검색합니다.구문 분석 함수`findObjectsInBackgroundWithBlock :`일부 데이터베이스 개체를 검색하지만 모두는 아닙니다.
- (void) addFoodsToArray:(NSMutableArray*)targetArray {
PFQuery * foodQuery = [PFQuery queryWithClassName:@"Food"];
[foodQuery findObjectsInBackgroundWithBlock:^(NSArray * foods, NSError * error) {
for (PFObject *foodRaw in foods) {
MenuItem *food = [[MenuItem alloc] initWithName:[foodRaw valueForKey:@"name"] andURL:nil];
[targetArray addObject:food];
}
}];
}
Dude. 'findObjectsInBackgroundWithBlock' 메서드를 확인하십시오. 사용중인 coreData 인 경우 배치 크기를 확인하십시오. – croyneaus4u
핵심 데이터가 아니며 데이터를 저장하기 위해 parse.com이라는 타사 호스트를 사용하고 있습니다. 'findObjectsInBackgroundWithBlock'는 그들이 제공하는 함수 중 하나입니다. – Mahir