I think it is to recalculate the position of each label, and then do a position transformation animation for each label. You can see that the rightmost one in each row moves diagonally to the first one in the next row, so it is an animation of the x and y coordinate transformation of the two positions. Because each label has a fixed size (at least a quarter of the superview width), the position should be easier to calculate.
I think it is to recalculate the position of each label, and then do a position transformation animation for each label. You can see that the rightmost one in each row moves diagonally to the first one in the next row, so it is an animation of the x and y coordinate transformation of the two positions.
Because each label has a fixed size (at least a quarter of the superview width), the position should be easier to calculate.
UICollectionView不是自带动画的方法吗?
(void)insertItemsAtIndexPaths:(NSArray<NSIndexPath > )indexPaths;
(void)deleteItemsAtIndexPaths:(NSArray<NSIndexPath > )indexPaths;
(void)reloadItemsAtIndexPaths:(NSArray<NSIndexPath > )indexPaths;
(void)moveItemAtIndexPath:(NSIndexPath )indexPath toIndexPath:(NSIndexPath )newIndexPath;