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秒钟后再开始旋转 ...
随机推荐
- Learning with Trees
We are now going to consider a rather different approach to machine learning, starting with one of t ...
- sql整型字段模糊查询
select count(*) cnt from vhuiy where CAST(id as text) like'%12%'--id为int类型 更详细的链接:http://www.studyof ...
- 使用Template控制Editor显示方式
@Html.EditorFor可以由Template决定显示 虽然都是EditorFor,页面上显示却不同,ReleaseDate是一个Jquery DatePicker: 怎么实现的呢?就是Temp ...
- Hubilder快捷键
/* tips.txt的内容可以在HBuilder启动封面中显示.你可以自定义一个有趣的启动tips,增加[user]开头的文本内容即可.比如[user]我要减肥! */ 你按照Hello HBui ...
- C#与XML Schema的问题
http://bbs.csdn.net/topics/50493564 weileily: 用XmlSchema.Read方法读取了一个xsd文件,请问如何遍历检索器中的ComplexType与Sim ...
- .Net内存泄露原因及解决办法
.Net内存泄露原因及解决办法 1. 什么是.Net内存泄露 (1).NET 应用程序中的内存 您大概已经知道,.NET 应用程序中要使用多种类型的内存,包括:堆栈.非托管堆和托管堆.这里我们需 ...
- Java和C/C++进行DES/AES密文传输(借鉴)
Java和C/C++进行DES/AES密文传输 声明:对于新手来说很难解决的一个问题,终于在非常煎熬之后找到这篇文章,所以借鉴过来.原文地址http://blog.sina.com.cn/s/blog ...
- SAP HR宏 rp-provide-from-last
运行se11 Database table: 输入 TRMAC 点击display 查看其内容:第14个按钮(ctrl + shift +F10) 再Name 输入:rp-provide-from-l ...
- Trapping Rain Water
Given n non-negative integers representing an elevation map where the width of each bar is 1, comput ...
- python 杨辉三角
前提:端点的数为1. 每个数等于它上方两数之和. 每行数字左右对称,由1开始逐渐变大. 第n行的数字有n项. 第n行数字和为2n-1. 第n行的m个数可表示为 C(n-1,m-1),即为从n-1个不同 ...