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直接将动 ...
随机推荐
- fatal: Authentication failed for 'http://git
git pull 出现 fatal: Authentication failed for 'http://git... git config --system --unset credential.h ...
- 深入理解@LoadBalanced注解的实现原理与客户端负载均衡
前提 在阅读这篇博客之前,希望你对SpringCloud套件熟悉和理解,更希望关注下微服务开发平台 概述 在使用springcloud ribbon客户端负载均衡的时候,可以给RestTemplate ...
- day2-day3基本数据类型专区
一.基本数据类型 1.字符串 str (用''or“”表示) 字符串中每个组成部分为字符,python中只要是用引号引起来的都叫字符串 ---特征: 加法 n1 = "alex" ...
- Apache httpd 2.4.27开启GZIP压缩功能
转载自素文宅博客:https://blog.yoodb.com/yoodb/article/detail/1373 HTTP协议上的GZIP编码是一种用来改进WEB应用程序性能的文件压缩算法,现在的应 ...
- idea 常用功能
Ctrl + E:打开最近文件 双击 Shift:按文件名查找文件 Ctrl + Shift + F:全局搜索 Alt + ~(数字 1 左边的键):commit.push 代码 ...
- 图片转换成base64预览
来源:https://developer.mozilla.org/zh-CN/docs/Web/API/FileReader/readAsDataURL 真心不错写得,思路比较清晰.已经测试过 注意: ...
- 后台开发小白必学服务器框架——UDPServer
毕业后加入了一家大型的互联网公司的音视频产品部门做后台开发,其实我本身是学习自动化的,研究生的方向嵌入式系统,对互联网可是一知半解,因此能进入这样一个大公司还是很幸运的. 刚开始工作的半年应该是在上份 ...
- 前端小白在asp.net core mvc中使用ECharts
对于在浏览器中绘制图形图表,目前有较多的js类库可以使用,如:ChartJS,Flot,canvasjs等,但是今天介绍的主角为国产图表库,并在apache孵化,就是大名鼎鼎的echarts. 前方高 ...
- CSS:CSS弹性盒子布局 Flexible Box
一.简介 flexbox:全称Flexible Box, 弹性盒子布局.可以简单实现各种伸缩性的设计,它是由伸缩容器和伸缩项目组成.任何一个元素都可以指定为flexbox布局.这种新的布局方案在200 ...
- Flutter高仿微信项目开源-具即时通讯IM功能
项目地址:https://github.com/fluttercandies/wechat_flutter wechat_flutter Flutter版本微信 效果图: 下载体验(Android) ...