美文网首页消息推送
UICollectionView单元格动画的特效

UICollectionView单元格动画的特效

作者: iOS乐乐 | 来源:发表于2017-07-18 11:16 被阅读0次
- (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath {
    
    SXTNearLiveCell * c = (SXTNearLiveCell *)cell;
    [c showAnimation];
}



//Cell
@implementation SXTNearLiveCell

- (void)showAnimation {
        //x和y的最终值为1
    if (self.live.isShow) {
        return;
    }
    self.layer.transform = CATransform3DMakeScale(0.1, 0.1, 1);

    [UIView animateWithDuration:1 animations:^{
        self.layer.transform = CATransform3DMakeScale(1, 1, 1);
        self.live.show = YES;
    }];
}



相关文章

网友评论

    本文标题:UICollectionView单元格动画的特效

    本文链接:https://www.haomeiwen.com/subject/hqgckxtx.html