0

我意识到这个问题可能有一个简单的答案,但是在查看 Parse.com 上的所有相关文档和许多其他资源后,我没有找到它。这是我正在查看的代码片段:

    PFUser *currentUser = [PFUser currentUser];


    PFQuery *query = [PFQuery queryWithClassName:@"ProfileInfo"];
    [query whereKey:@"userID" equalTo:[PFUser currentUser]];

    [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {

        /* What is the easiest way to pull the key/value pairs from the returned NSArray of PFobjects here? */
    }];

非常感谢任何帮助,在此先感谢!

4

1 回答 1

1
for(PFObject *pfObject in objects){
    NSString *someValue = [pfObject objectForKey:@"someKey"];

    //or if it's a number
    NSNumber *someNumber = [pfObject objectForKey:@"someOtherKey"];
}
于 2013-10-18T02:42:39.793 回答