我正在尝试使用带有自定义单元格的 TableView 中的按钮创建 PFRelation,但我无法创建这些关系,我只创建与特定用户的关系,而不管我选择的单元格如何。..
我在哪里做错了?
- (IBAction)FFAddAmiciAction:(id)sender {
NSIndexPath *indexPath = [[self tableView] indexPathForSelectedRow];
PFObject *searchedUser = [self.objects objectAtIndex:indexPath.row];
PFUser *user = [PFUser currentUser ];
PFRelation *relation = [user relationforKey:@"Amic"];
[relation addObject:searchedUser];
[user saveInBackground];
}