• 翻转的动画
//开始动画
[UIView beginAnimations:@"doflip" context:nil];
//设置时常
[UIView setAnimationDuration:];
//设置动画淡入淡出
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
//设置代理
[UIView setAnimationDelegate:self];
//设置翻转方向
[UIView setAnimationTransition:
UIViewAnimationTransitionFlipFromLeft forView:manImageView cache:YES];
//动画结束
[UIView commitAnimations];
  • 旋转动画
//创建一个CGAffineTransform transform对象
CGAffineTransform transform;
//设置旋转度数
transform = CGAffineTransformRotate(manImageView.transform,M_PI/6.0);
//动画开始
[UIView beginAnimations:@"rotate" context:nil ];
//动画时常
[UIView setAnimationDuration:];
//添加代理
[UIView setAnimationDelegate:self];
//获取transform的值
[manImageView setTransform:transform];
//关闭动画
[UIView commitAnimations];
  • 偏移动画
[UIView beginAnimations:@"move" context:nil];
[UIView setAnimationDuration:];
[UIView setAnimationDelegate:self];
//改变它的frame的x,y的值
manImageView.frame=CGRectMake(,, ,);
[UIView commitAnimations];
  • 翻页动画
[UIView beginAnimations:@"curlUp" context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];//指定动画曲线类型,该枚举是默认的,线性的是匀速的
//设置动画时常
[UIView setAnimationDuration:];
[UIView setAnimationDelegate:self];
//设置翻页的方向
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:manImageView cache:YES];
//关闭动画
[UIView commitAnimations];
  • 缩放动画
CGAffineTransform transform;
transform = CGAffineTransformScale(manImageView.transform,1.2,1.2);
[UIView beginAnimations:@"scale" context:nil];
[UIView setAnimationDuration:];
[UIView setAnimationDelegate:self];
[manImageView setTransform:transform];
[UIView commitAnimations];
  • 取反的动画效果是根据当前的动画取他的相反的动画
CGAffineTransform transform;
transform=CGAffineTransformInvert(manImageView.transform); [UIView beginAnimations:@"Invert" context:nil];
[UIView setAnimationDuration:];//动画时常
[UIView setAnimationDelegate:self];
[manImageView setTransform:transform];//获取改变后的view的transform
[UIView commitAnimations];//关闭动画

最新文章

  1. MySQL PXC构建一个新节点只需IST传输的方法
  2. python征程1.1(初识python)
  3. Oracle(修改表结构和约束)
  4. MySQL 创建表
  5. Jenkins_获取源码编译并启动服务(二)
  6. curl用法
  7. 学习笔记_Java_day13_三层的HelloWorld程序(15)--不错,整体三层架构学习
  8. HP DL360 G7通过iLO部署系统
  9. [置顶] 局部加权回归、最小二乘的概率解释、逻辑斯蒂回归、感知器算法——斯坦福ML公开课笔记3
  10. CentOS 6.4 + 曙光DS200 IPSan组建FTP服务器
  11. 【虚拟化实战】容灾设计之三Stretched Cluster
  12. Spring整合JMS-基于activeMQ实现(二)
  13. ajax数据请求2(json格式)
  14. PAT1019:General Palindromic Number
  15. socket通信的遇到的问题1
  16. (转)漫谈MySql中的事务
  17. sklearn学习笔记(一)——数据预处理 sklearn.preprocessing
  18. python 并发协程
  19. K-means算法实现
  20. js获取浏览器信息及版本(兼容IE)

热门文章

  1. 深度学习网络结构中超参数momentum了解
  2. 解决向github提交代码不用输入帐号密码
  3. css3 实现瀑布流
  4. .pdm文件怎么打开
  5. URAL 1996 Cipher Message 3
  6. jsoup解析xml某片段的问题
  7. mysql慢日志记录
  8. Flutter实战视频-移动电商-41.详细页_数据接口的调试
  9. PYTHON实现DFS算法
  10. ASP.NET Core Web API + Angular 仿B站(三)后台配置 JWT 的基于 token 的验证