多张图片整合成连续动画的代码
把多张图片整合成连续动画,这恐怕是很多苹果开发者需要的功能。下面是单次播放和循环播放的代码。
animationImageView.animationImages = imageFrames;// imageFrames 是一个图片数组 animationImageView是一个imageview
[UIView setAnimationDelegate:self];
animationImageView.animationDuration = 0.75f;
animationImageView.animationRepeatCount = 3;
[animationImageView startAnimating];
shouldPlay = NO;
NSInteger timeout = 3;
[NSTimer scheduledTimerWithTimeInterval:timeout target:self selector:@selector(stopAnimation) userInfo:nil repeats:NO];
循环播放的代码
UIImageView* animView= [[UIImageView alloc] initWithFrame:self.view.frame];
animView.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"01.gif"],
[UIImage imageNamed:@"02.gif"],
[UIImage imageNamed:@"03.gif"],nil];
// all frames will execute in 1.75 seconds
animView.animationDuration = 1.75;
// repeat the annimation forever
animView.animationRepeatCount = 0;
// start animating
[animView startAnimating];
// add the animation view to the main window
[self.view addSubview:animView];
分享到:
相关推荐
特效动画
springboot整合redis.算是比较全面的一种整合方式了. springboot整合redis.算是比较全面的一种整合方式了.
springboot整合nacos完整代码,可以直接运行
spring 整合JDBC 原创代码 自己导入Jar 文件
该代码实现SpringBoot整合Mybatis的入门代码案例,适合初学者学习使用。
ssh框架的简单整合代码
Spring+hibernate整合源代码 结束Sping+hibernate 的使用方法 包括演示示例
资源名称:交互动画设计:Zbrush Autodesk Unity Kinect Arduino三维体感技术整合资源截图: 资源太大,传百度网盘了,链接在附件中,有需要的同学自取。
适用的FLASH透明动画,主要用在网站通栏上,源文件全都整理好,对网站设计动画的站长非常适用
SSH(Struts2+Hibernate3+Spring2.5)整合示例源代码。所有需要的包,配置文件等齐全!
springboot整合clickhouse代码
Spring-SpringMvc-MyBatis_MySql --ssm整合, 数据库MySQL适用8.0版本
SSH整合的CRM项目源代码,适合大学生和初学者学习,里面包含了全部的源代码。
springboot整合fastdfs完整版代码,下载解压后需要在yml配置文件中填上你的数据库信息和安装fastdfs的服务器信息
对现网流量进行整合成一个视频,类似将ssss00001,ssss0002,ssss0003 这种名字排序规律进行整合的
实战突击:java项目开发案例整合源代码 FTP客户端、网络五子棋、电子商城、BBS论坛
《SSH整合项目中的代码抽取和源码分析》视频课程中用到的JAR包 《SSH整合项目中的代码抽取和源码分析》视频课程中用到的JAR包 《SSH整合项目中的代码抽取和源码分析》视频课程一共10个视频,合计分钟。《SSH整合项目...
SSM框架整合源代码下载
SSM(Spring4.x.x+SpringMVC4.x.x+Mybatis3.4.x)框架整合详细代码
springboot整合activiti6.0的代码demo,首先按照自己的数据库地址修改springboot地址,然后运行AppBoot启动类,启动工程,然后通过postman工具访问MyController类中的方法即可观察结果。