Voici une partie de mon programme. Loop in findDuplicates démarre dans le fil d'arrière-plan après avoir appuyé sur le bouton. Y at-il un moyen d'arrêter/tuer thread/boucle en appuyant sur un autre bouton?Comment faire pour terminer la boucle/thread
- (IBAction)countDups:(id)sender {
[self performSelectorInBackground:@selector(findDuplicates) withObject:nil];
}
-(void)findDuplicates
{
...
for(int index=0;index<self.resultList.count;index++)
{ ... }
...
}