照会した複数のユーザーを一度に 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;
}