2016-08-01 1 views
1

Salut j'écris une implémentation pour gérer NSFetchResultsController DidChangeSection mais je m'y suis cet avertissement étrangepoignée NSFetchedResultsController DidChangeSection IOS de base de données

Voici ma méthode

- (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id <NSFetchedResultsSectionInfo>)sectionInfo 
      atIndex:(NSUInteger)sectionIndex forChangeType:(NSFetchedResultsChangeType)type 
{ 
    switch (type) { 
     case NSFetchedResultsChangeInsert: 
      [stampsTableView insertSections:[NSIndexSet indexSetWithIndex:sectionIndex] withRowAnimation:UITableViewRowAnimationFade]; 
      break; 

     case NSFetchedResultsChangeDelete: 
      [stampsTableView deleteSections:[NSIndexSet indexSetWithIndex:sectionIndex] withRowAnimation:UITableViewRowAnimationFade]; 
      break; 
    } 
} 

Et l'avertissement est image ci-dessous. De toute façon pour résoudre l'avertissement? Merci!

enter image description here

Répondre

0

par défaut ajouter à traiter d'autres cas

switch (type) { 
    case NSFetchedResultsChangeInsert: 
     break; 
    case NSFetchedResultsChangeDelete: 
     break; 
    default: 
     break; 
}