iOS开发动画(Animation)总结
- //开始动画
- [UIView beginAnimations:@"doflip" context:nil];
- //设置时常
- [UIView setAnimationDuration:1];
- //设置动画淡入淡出
- [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:2];
- //添加代理
- [UIView setAnimationDelegate:self];
- //获取transform的值
- [manImageView setTransform:transform];
- //关闭动画
- [UIView commitAnimations];
[UIView beginAnimations:@"move" context:nil];
[UIView setAnimationDuration:2];
[UIView setAnimationDelegate:self];
//改变它的frame的x,y的值
manImageView.frame=CGRectMake(100,100, 120,100);
[UIView commitAnimations];
- [UIView beginAnimations:@"curlUp" context:nil];
- [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];//指定动画曲线类型,该枚举是默认的,线性的是匀速的
- //设置动画时常
- [UIView setAnimationDuration:1];
- [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:2];
- [UIView setAnimationDelegate:self];
- [manImageView setTransform:transform];
- [UIView commitAnimations];
- CGAffineTransform transform;
- transform=CGAffineTransformInvert(manImageView.transform);
- [UIView beginAnimations:@"Invert" context:nil];
- [UIView setAnimationDuration:2];//动画时常
- [UIView setAnimationDelegate:self];
- [manImageView setTransform:transform];//获取改变后的view的transform
- [UIView commitAnimations];//关闭动画
iOS开发动画(Animation)总结的更多相关文章
- iOS开发--动画(Animation)总结
UIView的,翻转.旋转,偏移,翻页,缩放,取反的动画效果 翻转的动画 //开始动画 [UIView beginAnimations:@"doflip" context:ni ...
- iOS 开发--动画
在iOS开发中,制作动画效果是最让开发者享受的环节之一.一个设计严谨.精细的动画效果能给用户耳目一新的效果,吸引他们的眼光 —— 这对于app而言是非常重要的.我们总是追求更为酷炫的实现,如果足够仔细 ...
- iOS开发 - Core Animation 核心动画
Core Animation Core Animation.中文翻译为核心动画,它是一组很强大的动画处理API,使用它能做出很炫丽的动画效果.并且往往是事半功倍. 也就是说,使用少量的代码就能够实现很 ...
- iOS开发--动画篇之layout动画深入
"不得不说,单单是文章的标题,可能不足以说明本文的内容.因此,在继续讲述约束动画之前,我先放上本文要实现的动画效果." 编辑:Bison投稿:Sindri的小巢 约束动画并不是非常 ...
- iOS开发——动画OC篇&知识点总结
图层与动画知识点总结 1.Core Animation 非娱乐类的软件都会用到的动画,操作简单. 2.Quartz 2D绘图 是一个2D绘图引擎. (1) 绘图Context是一个绘图的目标对象,定义 ...
- iOS开发——动画篇Swift篇&动画效果的实现
Swift - 动画效果的实现 在iOS中,实现动画有两种方法.一个是统一的animateWithDuration,另一个是组合出现的beginAnimations和commitAnimation ...
- iOS开发——动画编程Swift篇&(五)CAKeyframeAnimation
CAKeyframeAnimation //CAKeyframeAnimation-关键针动画 @IBAction func cakFly() { let animation = CAKeyframe ...
- iOS开发——动画编程Swift篇&(四)CABasicAnimation动画
CABasicAnimation动画 //CABasicAnimation-不透明度 @IBAction func cabOpacity() { let animation = CABasicAnim ...
- iOS开发——动画篇Swift篇&常用动画总结
UIView动画: UIView动画时最基本的动画,是直接对我们界面上控件进行简单的动画效果实现,如果你只需要用到一些简单的效果,那么这个很适合你,关于UIView动画实现恨简单, UIKit直接将动 ...
随机推荐
- [转载]2.6 UiPath循环嵌套的介绍和使用
一.循环嵌套的介绍 一个循环体内又包含另一个完整的循环结构,就称之为循环嵌套.内嵌的循环中还可以嵌套循环,这就是多层循环,也叫做多重循环. 二.在UiPath中结合使用循环嵌套生成99乘法表 1.打开 ...
- 映客直播软开校招岗(go语言)
问题: 笔试: 比较简单,有一道题比较深刻: 内存1G,需要计算1G的数据排序,哪种排序方法效率最低,当时选的是冒泡,因为涉及到频繁的数据交换,其实应该是归并,因为归并不是原地排序,多占用的内存空间, ...
- deepin 15.11添加应用启动图标
以postman为例(路径要按需修改) 1.建立软链接 sudo ln -s /home/lixing/software/Postman/Postman /usr/bin/postman 前面地址为安 ...
- oracle实现"limit"功能
转载于http://blog.sina.com.cn/s/blog_67e2758d0100s3oc.html oracle数据库不支持mysql中limit功能,但可以通过rownum来限制返回的结 ...
- Centos7編譯安裝LAMP平臺
什麽是LAMP? 拆開看 L 就是Linux系統 A是Apache的縮寫 M.P則是MySQL和PHP的简写. 其实就是把Apache, MySQL以及PHP安装在Linux系统上,组成一个环境来运行 ...
- caffe网络在多线程中无法使用GPU的解决方案 | cpp caffe net run in multiple threads
本文首发于个人博客https://kezunlin.me/post/8d877e63/,欢迎阅读! cpp caffe net run in multiple threads Guide set_mo ...
- 启动elasticsearch
- name: source env shell: source /etc/profile - name: make elastic permission shell: ...
- beta week 1/2 Scrum立会报告+燃尽图 02
此作业要求参见https://edu.cnblogs.com/campus/nenu/2019fall/homework/9912 一.小组情况 队名:扛把子 组长:孙晓宇 组员:宋晓丽 梁梦瑶 韩昊 ...
- python3 之 匿名函数
一.语法: lambda 参数:方法(或三元运算) #最多支持3元运算 二.实例1:基础 #函数1: a = lambda x:x*x print(a(2)) #函数2: def myfun(x): ...
- Java虚拟机之栈
一.程序计数器(寄存器):PCR 作用:记住下一条JVM指令的执行地址. 特点:①线程私有的 ②不会存在内存溢出 二.虚拟机栈 1.定义 虚拟机栈:线程运行所需要的内存空间. 栈帧:一个栈帧对应一个方 ...