我想一次将我查询的多个用户添加到 PFRelation。我该怎么做。是否所有用户信息都存储在 PFRelation 中,以便当前用户以后可以访问它?
//so now i am finding users in the PFRelation, but I cannot use the Users information in a table. The code for the table view is at the bottom.
PFQuery * query =[self.matchesRelation query];
[query orderByDescending:@"Score"];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if (!error) {
self.myMatches =[objects mutableCopy];
[self.tableView reloadData];
}
}];
//code for the tableview, i can set the users username fine but anything else i cant
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString * CellIdentifier =@"Cell";
customCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
self.person =[self.myMatches objectAtIndex:indexPath.row];
cell.name.text = self.person.username;
//this does not work, why ?
cell.score.text =[self.person objectForKey:@"Score"];
return cell;
}