如何从Parse for iOS检索多个对象
我打算编写一个iOS应用程序来从解析中检索对象。显示如何检索特定对象(具有特定id)。但是我想根据表中的特定字段检索对象 我该怎么做?类似这样的事情:如何从Parse for iOS检索多个对象,ios,parse-platform,Ios,Parse Platform,我打算编写一个iOS应用程序来从解析中检索对象。显示如何检索特定对象(具有特定id)。但是我想根据表中的特定字段检索对象 我该怎么做?类似这样的事情: PFQuery *query = [PFQuery queryWithClassName:@"GameScore"]; [query whereKey:@"playerName" equalTo:@"Dan Stemkoski"]; [query findObjectsInBackgroundWithBlock:^(NSArray *object
PFQuery *query = [PFQuery queryWithClassName:@"GameScore"];
[query whereKey:@"playerName" equalTo:@"Dan Stemkoski"];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if (!error) {
// The find succeeded.
NSLog(@"Successfully retrieved %d scores.", objects.count);
// Do something with the found objects
for (PFObject *object in objects) {
NSLog(@"%@", object.objectId);
}
} else {
// Log details of the failure
NSLog(@"Error: %@ %@", error, [error userInfo]);
}
}];
您只需创建一个查询,并向查询添加边界或限制,如whereKey:@“username”isEqual:parse是文档中众所周知的。他们从a-z给你写了所有的东西看看