Je ne comprends pas ce que j'ai fait de mal.Aucune méthode de classe connue pour le sélecteur 'indexPathForCell:'
(void)viewWillAppear:(BOOL)animated
{
[[self tableView] reloadData];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:@"AddTest"])
{
Model *newShots = [[testStore sharedTestStore] createTest];
testViewController *newShotViewController = segue.destinationViewController;
[newShotViewController setCurrentScore:newShots];
}
else if ([segue.identifier isEqualToString:@"DetailTest"])
{
NSIndexPath *indexPath = [UITableView indexPathForCell:sender];
Model *course = [[[testStore sharedTestStore] allTests] objectAtIndex:[indexPath row]];
detailTestViewController *viewCourseController = segue.destinationViewController;
[viewCourseController setCurrentScore:course];
}
}
Sa me donne une erreur de
aucune méthode de classe Sache indexPath pour la cellule
dans la ligne:
NSIndexPath *indexPath = [UITableView indexPathforCell:sender];
Je ne sais pas ce que je avez-vous mal fait?