objective c - switch between multiple NSFetchedResultsController and animate it in the collectionView -
i'm trying change datasource (nsfetchedresultscontroller) of collectionview on fly. have var currentfetchesresultscontroller can change. after call reloaddata
on collectionview. far good, cells not animated...
i tried:
[self.collectionview performbatchupdates:^{ [self.collectionview reloaddata]; } completion:^(bool finished) {}];
then following error:
*** terminating app due uncaught exception 'nsinternalinconsistencyexception', reason: 'invalid update: invalid number of sections. number of sections contained in collection view after update (4) must equal number of sections contained in collection view before update (1), plus or minus number of sections inserted or deleted (0 inserted, 0 deleted).'
what's best way solve this?
thanks in advance help.
here discussed how update uicollectionview updated (not new) datasource without getting nsinternalinconsistencyexception. hope helps.
Comments
Post a Comment