2016-08-01 43 views
1

嗨,我正在寫一個實現來處理NSFetchResultsController DidChangeSection,但我得到這個奇怪的警告手柄NSFetchedResultsController DidChangeSection IOS核心數據

這裏是我的方法

- (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; 
    } 
} 

,警告是PIC波紋管。無論如何要解決警告?謝謝!

enter image description here

回答

0

添加默認處理其他案件

switch (type) { 
    case NSFetchedResultsChangeInsert: 
     break; 
    case NSFetchedResultsChangeDelete: 
     break; 
    default: 
     break; 
} 
相關問題