1.动画旋转:

    [UIViewbeginAnimations:@"View Flip"context:nil];     //声明,@"XX"为标题,
[UIViewsetAnimationDuration:1.25]; //持续时间
[UIViewsetAnimationCurve:UIViewAnimationCurveEaseInOut]; //设置动画曲线
//加入新的坐标 //旋转视图
[UIViewsetAnimationTransition:UIViewAnimationTransitionFlipFromRight
forView:self.viewcache:YES]; ///调用

2.左右晃动动画:

 // start the wiggling animation
CGFloatrotation =0.03; CABasicAnimation*shake = [CABasicAnimation animationWithKeyPath:@"transform"];
shake.duration = 0.13;
shake.autoreverses = YES;
shake.repeatCount = MAXFLOAT;
shake.removedOnCompletion = NO;
shake.fromValue = [NSValue valueWithCATransform3D:CATransform3DRotate(self.layer.transform,-rotation, 0.0 ,0.0 ,1.0)];
shake.toValue = [NSValue valueWithCATransform3D:CATransform3DRotate(self.layer.transform, rotation, 0.0 ,0.0 ,1.0)]; [self.layeraddAnimation:shake forKey:@"shakeAnimation"]; //然后在退出的时候移除
[self.layer removeAnimationForKey:@"shakeAnimation"];

3、

    CATransform3D transformBefore = CATransform3DIdentity;
transformBefore.m34 = 0.0005;
transformBefore = CATransform3DRotate(transformBefore,(M_PI/*), , , );
instroduceLayer.layer.transform = transformBefore;
instroduceLayer.layer.anchorPoint = CGPointMake(0.0, 0.5); [UIViewanimateWithDuration:1animations:^{
CATransform3D transform = CATransform3DIdentity;//单位矩阵
transform.m34 = 0.0005;
transform = CATransform3DRotate(transform,(M_PI/*), , , );
instroduceLayer.layer.transform = transform;
}];

最新文章

  1. 以冒泡排序为例--malloc/free 重定向stdin stdout
  2. CEF使用的几个注意点
  3. ab压力测试和CC预防
  4. [转]Windows Shell 编程 第四章 【来源 http://blog.csdn.net/wangqiulin123456/article/details/7987933】
  5. 【UVA1371】Period (二分+DP)
  6. 初涉JavaScript模式 (4) : 构造函数
  7. first day for new job
  8. java类加载器行为[笔记]
  9. java中的对象
  10. iOS开发之判断横竖屏切换
  11. Django内置Admin
  12. 如何把kotlin+spring boot开发的项目部署在tomcat上
  13. Python3 条件控制
  14. cadence学习一------>介绍
  15. window下安装 node ,并搭建 vue 项目
  16. Hadoop专有名词
  17. JavaWeb:一个Servelt多个请求
  18. [浅谈CSS核心概念] CSS布局模型:float和position
  19. VS Code .vue文件代码缩进以及格式化代码
  20. android 中解析json格式数据

热门文章

  1. 实验一 Java开发环境的熟悉(Linux + Idea) 20175301李锦然
  2. IScroll5不能滑到最底端的解决办法
  3. reduce/filter/map/zip/isinstance/list列表推导式
  4. Exp2 后门原理与实践 20164314 郭浏聿
  5. 第十三届东北师范大学程序设计竞赛热身赛 C(exgcd+欧拉函数)
  6. iOS 开发 ZFUI framework控件,使布局更简单
  7. selenium采用xpath方法识别页面元素
  8. 三, 练习 python索引 (list和tuple)
  9. JavaScript代码规范
  10. Python3学习笔记(urllib模块的使用)