文章

UICollectionView的Cell加载动画

1
2
3
4
5
6
7
8
-(void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath {
//    CGAffineTransformMake(a,b,c,d,tx,ty)
//    ad缩放bc旋转tx,ty位移,基础的2D矩阵
    cell.transform = CGAffineTransformMakeScale(1.4, 1.4);//CGAffineTransformMake(1.4, 0, 0, 1.4, 10, 10);
    [UIView animateWithDuration:0.5 delay:0.0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
        cell.transform = CGAffineTransformIdentity;
    } completion:nil];
} <!--more-->
本文由作者按照 CC BY 4.0 进行授权