TableView使用CATransform3D特效动画
效果一:

在代理方法中实现:
- (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;
}];
}
效果九:

- 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特效动画的更多相关文章
- 超炫数字特效动画AE模板
下载方式: 网盘地址+迅雷地址+迅雷地址+备份地址 <ignore_js_op> 本AE模板是由Videohive机构出品的超炫数字特效动画AE模板,Videohive The Numbe ...
- 用TableView写带特效的cell
用TableView写带特效的cell 效果: 源码地址: https://github.com/YouXianMing/UI-Component-Collection 分析: 在UIScrollVi ...
- 关于UI功能解锁,UI特效动画,UI tips的再思考
之前写过一篇这样的文章,但当时的思路可行性太低 首先所有的UI面板通过发送字符串消息来告知,是否触发了解锁检测,tips检测,动画特效.可以理解为这样的接口: AsyncResult SendUIMe ...
- tableview cell添加3D动画
当cell显示之前,会先调用该方法,因此给cell添加动画,在这个方法里面即可. -(void)tableView:(UITableView *)tableView willDisplayCell:( ...
- collectionView/tableview刷新时关闭动画无效
collectionView/tableview reloadSections/reloaddata时去掉动画无效时可以尝试使用 [UIView performWithoutAnimation:^{ ...
- 踏得网互联网新技术垂直搜索服务和分享 - HTML5动效/特效/动画搜索
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/iefreer/article/details/34917729 当前主流搜索引擎在解决互联网技术创意 ...
- swift - tableView数据向上收缩动画
// // TTTableViewController.swift // tableVIewAnimation // // Created by su on 15/12/11. // Copy ...
- 腾讯开源:Kotlin 高性能特效动画组件!
先看一下效果展示: 1. VAP VAP(Video Animation Player)是企鹅电竞开发,用于播放酷炫动画的实现方案. 相比Webp, Apng动图方案,具有高压缩率(素材更小).硬件解 ...
- css3的动画特效--动画序列(animation)
首先复习一下animation动画添加各种参数 (1)infinite参数,表示动画将无限循环.在速度曲线和播放次数之间还可以插入一个时间参数,用以设置动画延迟的时间.如希望使图标在1秒钟后再开始旋转 ...
随机推荐
- 在VS下使用 GitFlow管理项目开发
在VS下使用 GitFlow管理项目开发 1.右键将你的解决方案添加到源代码管理,如果你的VS没有安装git,会提示安装,安装完成之后,在团队资源管理可以看到如下界面 (图一) 2.安装gitflow ...
- Android中Service的使用
我个人的理解是:我们平时使用的android系统的app的后台应用,就是这个原理 可以利用Service实现程序在后台运行,依照这个原理,可以通过Service来实现关键代码的运行与实现. <一 ...
- MySQL数据库2 - 登录MySQL及数据库管理
一. 登录数据库 1.使用命令窗口登录MySQL 启动Mysql服务 -> 打开命令窗口 -> 输入登录密码 具体步骤:开始菜单 - 控制面板 - 管理工具 - 服务 - Mysql56( ...
- Web页中table导出到execl(带模板)
1.将excel另存为html,将其复制到aspx文件中 2.输出格式为excel InitData(); Response.Clear(); Response.Buffer = true; Resp ...
- ibeacon的使用和应用场景简单示例
目的,用ibeacon实现签到功能,不需要太严谨,只是试水. 拿到ibeacon的第一感觉是,这东西能用嘛,2-3年的电池,后面商家说是用个3M双面胶找个地方一贴就行,感觉不太靠谱,嘿嘿,在网上找了一 ...
- import和from import陷阱一
#from datetime import datetime import datetime format="output-%Y-%m-%d-%H%M%S.txt" str=&qu ...
- Grand Central Dispatch(GCD)
GCD GCD是异步执行任务的技术之一. GCD使用很简洁的记述方法,实现了极为复杂繁琐的多线程编程. dispatch_async(queue, ^{ //长时间处理 ...
- 关于Python脚本开头两行的:#!/usr/bin/python和# -*- coding: utf-8 -*-的作用 – 指定文件编码类型
#!/usr/bin/python指定用什么解释器运行脚本以及解释器所在的位置 # -*- coding: utf-8 -*-用来指定文件编码为utf-8的PEP 0263 -- Defining P ...
- 有一个无效 SelectedValue,因为它不在项目列表中。
在项目中出现绑定下拉框报错的问题 1:可能是先赋值,再绑定数据的问题 检查代码,是否有在数据绑定钱进行了赋值.
- Error:(1, 0) Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/9574
这个一般是因为你打开的项目所在的目录存在中文,把项目换到全英文目录下就没问题了