If i understood correctly:
Create an instance variable:
NSInteger _clickedCell;
then
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
_clickedCell = indexPath.row;
....
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if ( buttonIndex ==0) {
NSLog(@"ritorno");
}
else {
PFUser *user = [self.Utenti objectAtIndex:_clickedCell];
PFObject *RichiestaAmicizia = [PFObject objectWithClassName:FF_AMICIZIE_CLASS];
[RichiestaAmicizia setObject:[PFUser currentUser] forKey:FF_AMICIZIE_DA_USER];
[RichiestaAmicizia setObject:user forKey:FF_AMICIZIE_A_USER];
[RichiestaAmicizia setObject:@"In_Attesa" forKey:FF_AMICIZIE_STATO];
[RichiestaAmicizia saveInBackground];
NSLog(@"Send");
}
}