TableViewCell的3D翻转特效

来源:互联网 发布:淘宝宝婴儿秋冬服装 编辑:程序博客网 时间:2024/05/16 05:25

在tableView即将展示的时候调用UITableViewDelegate中的方法

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{

    //3D效果滑动cell可实现3D动画翻转效果

    cell.layer.transform =CATransform3DMakeRotation(M_PI,0,0,1);

    //翻转后需要添加动画恢复

    [UIViewanimateWithDuration:0.5animations:^{

        cell.layer.transform =CATransform3DIdentity;

    }];

}


0 0
原创粉丝点击