As "deleteItemsAtIndexPaths" documentation says
"The collection view updates the layout of the remaining items to account for the deletions, animating the remaining items into position as needed."
In my cases while deleting a cell from collection view its all cells are doing some animation but once i call deleteItemsAtIndexPaths the old animating cells who moved to their new position stop doing that animation?
So my issue is that how the keep that state same after moving cells to new position because of deleteItemsAtIndexPaths?
Edit:- My all cells are scaled down and doing wobbling pretty similar to "when user long press on app icon to delete app in iPhone.
[UIView animateWithDuration:0.125
delay:0
options:UIViewAnimationOptionCurveEaseInOut
animations:^{
self.transform = CGAffineTransformMakeScale(0.8,0.8);
} completion:^(BOOL finished){
if(finished) {
[self shouldAllowInteraction:NO];
CGAffineTransform leftWobble = CGAffineTransformRotate(self.transform, RADIANS(-1.0));
CGAffineTransform rightWobble = CGAffineTransformRotate(self.transform, RADIANS(1.0));
self.transform = leftWobble;
[UIView animateWithDuration:0.125
delay:0 options:(UIViewAnimationOptionRepeat | UIViewAnimationOptionAutoreverse | UIViewAnimationOptionAllowUserInteraction)
animations:^{
self.transform = rightWobble;
} completion:^(BOOL finished) {
}];
}
}];
But when i tried to delete a cell using
[cardsViewController.collectionView deleteItemsAtIndexPaths:indexPathArray];
All moved cells - (Cells after the deleted cell) stops doing that wobbling and scaled up. They don't retain same behaviour means animation.
eg. Sample gif is here.