效果一:

在代理方法中实现:

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
CATransform3D transform = CATransform3DIdentity;
// CA_EXTERN CATransform3D CATransform3DTranslate (CATransform3D t, CGFloat tx, CGFloat ty, CGFloat tz) tx: 左右移动 ty: 上下移动 transform = CATransform3DTranslate(transform, , , );
cell.layer.transform = transform;
[UIView animateWithDuration:0.5 animations:^{
cell.layer.transform = CATransform3DIdentity;
}];
}

效果二:

代码:

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
CATransform3D transform = CATransform3DIdentity;
// CA_EXTERN CATransform3D CATransform3DTranslate (CATransform3D t, CGFloat tx, CGFloat ty, CGFloat tz) tx: 左右移动 ty: 上下移动 transform = CATransform3DTranslate(transform, , , );
cell.layer.transform = transform;
[UIView animateWithDuration:0.5 animations:^{
cell.layer.transform = CATransform3DIdentity;
}];
}

效果三:

效果四:

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
CATransform3D transform = CATransform3DIdentity;
transform = CATransform3DRotate(transform, M_PI_2, , , );
transform = CATransform3DTranslate(transform, , , );
transform = CATransform3DScale(transform, 0.0, 0.0, 0.0); //由小变大
cell.layer.transform = transform;
cell.layer.opacity = 0.0; [UIView animateWithDuration:0.6 animations:^{
cell.layer.transform = CATransform3DIdentity;
cell.layer.opacity = ;
}];
}

效果五:

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
CATransform3D transform = CATransform3DIdentity;
// CA_EXTERN CATransform3D CATransform3DRotate (CATransform3D t, CGFloat angle, CGFloat x, CGFloat y, CGFloat z)
transform = CATransform3DRotate(transform, M_PI_2, , , );//渐变
// CA_EXTERN CATransform3D CATransform3DTranslate (CATransform3D t, CGFloat tx, CGFloat ty, CGFloat tz) tx: 左右移动 ty: 上下移动
transform = CATransform3DTranslate(transform, , , );//左边水平移动 transform = CATransform3DScale(transform, -0.5, 0.5, ); // sx sy 的任意一个为负 cell.layer.transform = transform;
cell.layer.opacity = 0.0; [UIView animateWithDuration:0.6 animations:^{
cell.layer.transform = CATransform3DIdentity;
cell.layer.opacity = ;
}];
}

效果六:

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
CATransform3D transform = CATransform3DIdentity;
// CA_EXTERN CATransform3D CATransform3DRotate (CATransform3D t, CGFloat angle, CGFloat x, CGFloat y, CGFloat z)
transform = CATransform3DRotate(transform, M_PI_2, 0.5, 0.0, );// 变化的角度
// CA_EXTERN CATransform3D CATransform3DTranslate (CATransform3D t, CGFloat tx, CGFloat ty, CGFloat tz) tx: 左右移动 ty: 上下移动
transform = CATransform3DTranslate(transform, , , ); // transform = CATransform3DScale(transform, 0.5, 0.0, 1); // sx sy 的任意一个为负
transform = CATransform3DScale(transform, 0.5, 0.0, ); // sx sy 的任意一个为负
cell.layer.transform = transform; [UIView animateWithDuration:0.6 animations:^{
cell.layer.transform = CATransform3DIdentity;
}];
}

效果七:

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
CATransform3D transform = CATransform3DIdentity;
// CA_EXTERN CATransform3D CATransform3DRotate (CATransform3D t, CGFloat angle, CGFloat x, CGFloat y, CGFloat z)
transform = CATransform3DRotate(transform, M_PI_2, 0.5, 0.0, );// 变化的角度 // CA_EXTERN CATransform3D CATransform3DTranslate (CATransform3D t, CGFloat tx, CGFloat ty, CGFloat tz) tx: 左右移动 ty: 上下移动
transform = CATransform3DTranslate(transform, , , );
transform = CATransform3DScale(transform, 0.0, 0.5, ); // sx sy 的任意一个为负 cell.layer.transform = transform;
[UIView animateWithDuration:0.6 animations:^{
cell.layer.transform = CATransform3DIdentity;
}];
}

效果八:

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
CATransform3D transform = CATransform3DIdentity;
transform = CATransform3DRotate(transform, M_PI_2, 0.0, 0.5, );// 变化的角度 x = 0.5 y = 0.5
transform = CATransform3DTranslate(transform, , , );
transform = CATransform3DScale(transform, 0.5, 0.5, ); cell.layer.transform = transform;
[UIView animateWithDuration:0.6 animations:^{
cell.layer.transform = CATransform3DIdentity;
}];
}

效果九:

代码: 上面代码改变 Rotate
  • transform = CATransform3DRotate(transform, M_PI_2, 0.5, 0.0, 0);// 变化的角度  x = 0.5  y = 0.5

效果十: 
 
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
CATransform3D transform = CATransform3DIdentity;
transform = CATransform3DRotate(transform, M_PI_2, 0.0, 0.0, );// 变化的角度 x = 0.5 y = 0.5
transform = CATransform3DTranslate(transform, -, , );
transform = CATransform3DScale(transform, 0.5, 0.0, ); cell.layer.transform = transform;
[UIView animateWithDuration:0.6 animations:^{
cell.layer.transform = CATransform3DIdentity;
}];
}

TableView使用CATransform3D特效动画的更多相关文章

  1. 超炫数字特效动画AE模板

    下载方式: 网盘地址+迅雷地址+迅雷地址+备份地址 <ignore_js_op> 本AE模板是由Videohive机构出品的超炫数字特效动画AE模板,Videohive The Numbe ...

  2. 用TableView写带特效的cell

    用TableView写带特效的cell 效果: 源码地址: https://github.com/YouXianMing/UI-Component-Collection 分析: 在UIScrollVi ...

  3. 关于UI功能解锁,UI特效动画,UI tips的再思考

    之前写过一篇这样的文章,但当时的思路可行性太低 首先所有的UI面板通过发送字符串消息来告知,是否触发了解锁检测,tips检测,动画特效.可以理解为这样的接口: AsyncResult SendUIMe ...

  4. tableview cell添加3D动画

    当cell显示之前,会先调用该方法,因此给cell添加动画,在这个方法里面即可. -(void)tableView:(UITableView *)tableView willDisplayCell:( ...

  5. collectionView/tableview刷新时关闭动画无效

    collectionView/tableview reloadSections/reloaddata时去掉动画无效时可以尝试使用 [UIView performWithoutAnimation:^{ ...

  6. 踏得网互联网新技术垂直搜索服务和分享 - HTML5动效/特效/动画搜索

    版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/iefreer/article/details/34917729 当前主流搜索引擎在解决互联网技术创意 ...

  7. swift - tableView数据向上收缩动画

    // //  TTTableViewController.swift //  tableVIewAnimation // //  Created by su on 15/12/11. //  Copy ...

  8. 腾讯开源:Kotlin 高性能特效动画组件!

    先看一下效果展示: 1. VAP VAP(Video Animation Player)是企鹅电竞开发,用于播放酷炫动画的实现方案. 相比Webp, Apng动图方案,具有高压缩率(素材更小).硬件解 ...

  9. css3的动画特效--动画序列(animation)

    首先复习一下animation动画添加各种参数 (1)infinite参数,表示动画将无限循环.在速度曲线和播放次数之间还可以插入一个时间参数,用以设置动画延迟的时间.如希望使图标在1秒钟后再开始旋转 ...

随机推荐

  1. fifo read

    #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types. ...

  2. 4、时间同步ntp服务的安装于配置(作为客户端的配置)

    yum安装ntpd服务   .yum -y install ntp ntpdate (安装时间同步ntp服务) . vi /etc/ntp.conf (修改ntpd服务的配置文件)   3.修改配置文 ...

  3. poj3159 差分约束 spfa

    //Accepted 2692 KB 1282 ms //差分约束 -->最短路 //TLE到死,加了输入挂,手写queue #include <cstdio> #include & ...

  4. android技巧(一):如何方便知晓当前Activity?如何管理应用中的Activity?如何最佳的启动一个Activity?

    1.如何方便知晓当前Activity? 可以不看代码根据当前界面就知道界面所在Activity的写法: 建立BaseActivity,继承自Activity,在BaseActivity的OnCreat ...

  5. Spring框架学习(二)

    一.依赖注入的三种注入方式 Spring框架为我们提供了三种注入方式:set注入.构造方法注入和接口注入. 1.set注入 规律:无论给什么赋值,配置文件中<property>标签的nam ...

  6. JQuery源码解析(十)

    默认回调对象设计 不传入任何参数,调用add的时候将函数add到内部的list中,调用fire的时候顺序触发list中的回调函数: function fn1(val) { console.log('f ...

  7. 官网服务质量检测脚本(源码来自《Python自动化运维实战》第二版刘天斯)

    脚本Python版本2.7 #!/usr/bin/python #-*- coding:utf-8 -*- import os,sys import time import sys import py ...

  8. day15_集合第一天

    1.集合体系 红色为今天所学 Collection                          (接口)|--List                       (接口) 元素有序,可以重复 ...

  9. notifyDataSetInvalidated()跟notifyDataSetChanged()的区别

    public void notifyDataSetChanged(): 通过一个外部的方法控制,如果适配器的内容改变了,那么就会强制调用getView来刷新每个Item的内容.这个方法内部实现了在每个 ...

  10. XPath注入笔记

    XPath注入 XQuery注入 测试语句:'or '1'='1 利用工具: Xcat介绍 Xcat是python的命令行程序利用Xpath的注入漏洞在Web应用中检索XML文档 下载地址:https ...