2016-08-01 46 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; 
} 
相关问题