その場で collectionView の dataSource (NSFetchedResultsController) を変更しようとしています。変更できる var currentFetchesResultsController があります。その後reloadData
、collectionView を呼び出します。ここまでは順調ですが、セルがアニメーション化されていません...
私も試しました:
[self.collectionView performBatchUpdates:^{
[self.collectionView reloadData];
} completion:^(BOOL finished) {}];
次に、次のエラーが表示されます。
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of sections. The number of sections contained in the collection view after the update (4) must be equal to the number of sections contained in the collection view before the update (1), plus or minus the number of sections inserted or deleted (0 inserted, 0 deleted).'
これを解決する最善の方法は何ですか?
よろしくお願いします。