、、、
-(void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath {
/* 从锚点位置出发,逆时针绕 X 坐标轴旋转90度*/
CATransform3D transform3D = CATransform3DMakeRotation(M_PI_2, 1.0, 0.0, 0.0);
// 缩放 x 轴缩放 0.2
CATransform3D transform3D1 = CATransform3DScale(transform3D, 0.2, 1, 1);
// 定义 cell 的初始状态
cell.alpha = 0.0;
cell.layer.transform = transform3D1;
cell.layer.anchorPoint = CGPointMake(0.5, 0.5); // 设置锚点位置;默认为中心点(0.5, 0.5)
[UIView animateWithDuration:0.5 animations:^{
cell.alpha = 1.0;
cell.layer.transform = CATransform3DIdentity;
}];
}
、、、