zoukankan      html  css  js  c++  java
  • UITableView滑动动画+FPSLabel

    主要使用了tableView的代理方法

    行将要显示的时候

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

    代码:

       cell.contentView.alpha = 0.3;
        CGAffineTransform transformScale = CGAffineTransformMakeScale(0.3,0.8); //缩放
        CGAffineTransform transformTranslate = CGAffineTransformMakeTranslation(0.5, 0.6);//改变位置
        
        cell.contentView.transform = CGAffineTransformConcat(transformScale, transformTranslate);
        [tableView bringSubviewToFront:cell.contentView];
        [UIView animateWithDuration:.4f
                              delay:0.05
                            options:UIViewAnimationOptionAllowUserInteraction
                         animations:^{
                             
                             cell.contentView.alpha = 1;
                             
                             //清空 transform
                             
                             cell.contentView.transform = CGAffineTransformIdentity;
                         } completion:nil];

    效果图:

    github连接:

    https://github.com/WuJiForFantasy/CellAnimation

  • 相关阅读:
    四则运算网页版
    第六周工作日志
    课堂作业数组最大和
    第五周总结
    四则运算三结对开发
    学习进度第四周
    个人模块记录表
    学习进度表第三周
    四则运算第二篇
    保序回归问题
  • 原文地址:https://www.cnblogs.com/hxwj/p/5028804.html
Copyright © 2011-2022 走看看