[翻译] JSAnimatedImagesView
JSAnimatedImagesView

本人测试的效果:


Description:描述
Easy to use UIView subclass to quickly add a cool animated carrousel of pictures to your app.
Documentation: http://cocoadocs.org/docsets/JSAnimatedImagesView/
可以非常简易的将旋转木马效果添加到你的应用当中。
Usage:使用
- Using CocoaPods:
- Add
pod 'JSAnimatedImagesView', '~> 1.0.'to yourPodfile. - You're done!
-- or --
- Clone the repository:
$ git clone git@github.com:JaviSoto/JSAnimatedImagesView.git
- Update the submodules:
$ git submodule update --init
- Check out the sample project. 检查项目文件
- Drag the two files
JSAnimatedImagesView.(h/m)onto your project. 将这两个文件JSAnimatedImagesView.(h/m)拖入到你的工程项目当中 - Drag
Dependencies/MSWeakTimer/MSWeakTimer.(h/m)onto your project. 将这两个文件/MSWeakTimer/MSWeakTimer.(h/m)拖入到你的工程项目当中 - Include the header file
JSAnimatedImagesView.hinto the controller where you want to use it. 添加上头文件 - Create a
JSAnimatedImagesViewinstance either via code, or in interface builder (by creating a UIView and changing its class toJSAnimatedImagesView). 通过代码创建出JSAnimatedImagesView的实例对象,或者通过IB - Set the data source property on the view (probably on the
viewDidLoadmethod): 设置图片数据源即可
self.animatedImagesView.dataSource = self;
- Implement the data source methods: 实现data source方法
@interface MyViewController () <JSAnimatedImagesViewDataSource> // Conform to the protocol @end
@implementation MyViewController - (NSUInteger)animatedImagesNumberOfImages:(JSAnimatedImagesView *)animatedImagesView
{
return self.myImageNames.count;
} - (UIImage *)animatedImagesView:(JSAnimatedImagesView *)animatedImagesView imageAtIndex:(NSUInteger)index
{
return [UIImage imageNamed:[self.myImageNames objectAtIndex:index]];
} @end
Configuration:配置
@property (nonatomic, assign) NSTimeInterval timePerImage;
Specifies the time each image is viewed until the next image is faded in.
精确设置每一张淡入淡出的图片的时间
@property (nonatomic, assign) NSTimeInterval transitionDuration;
Specifies the duration of the transition (fade-out/fade-in) animation.
精确设置淡入淡出的时间间隔
Compatibility:兼容性
JSAnimatedImagesViewis compatible with iOS5.0+ 兼容iOS5.0+以上JSAnimatedImagesViewrequires ARC. 需要开启ARC
[翻译] JSAnimatedImagesView的更多相关文章
- 《Django By Example》第五章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者@ucag注:大家好,我是新来的翻译, ...
- 《Django By Example》第四章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:祝大家新年快乐,这次带来<D ...
- [翻译]开发文档:android Bitmap的高效使用
内容概述 本文内容来自开发文档"Traning > Displaying Bitmaps Efficiently",包括大尺寸Bitmap的高效加载,图片的异步加载和数据缓存 ...
- 【探索】机器指令翻译成 JavaScript
前言 前些时候研究脚本混淆时,打算先学一些「程序流程」相关的概念.为了不因太枯燥而放弃,决定想一个有趣的案例,可以边探索边学. 于是想了一个话题:尝试将机器指令 1:1 翻译 成 JavaScript ...
- 《Django By Example》第三章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:第三章滚烫出炉,大家请不要吐槽文中 ...
- 《Django By Example》第二章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:翻译完第一章后,发现翻译第二章的速 ...
- 《Django By Example》第一章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:本人目前在杭州某家互联网公司工作, ...
- 【翻译】Awesome R资源大全中文版来了,全球最火的R工具包一网打尽,超过300+工具,还在等什么?
0.前言 虽然很早就知道R被微软收购,也很早知道R在统计分析处理方面很强大,开始一直没有行动过...直到 直到12月初在微软技术大会,看到我软的工程师演示R的使用,我就震惊了,然后最近在网上到处了解和 ...
- ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第一章:创建基本的MVC Web站点
在这一章中,我们将学习如何使用基架快速搭建和运行一个简单的Microsoft ASP.NET MVC Web站点.在我们马上投入学习和编码之前,我们首先了解一些有关ASP.NET MVC和Entity ...
随机推荐
- javac之向前引用
可以参考JLS7:https://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.3.2.3 public class Test5 ...
- Hive 安装
在安装Hive时,一定要在该机器上添加了hadoop服务. 下载并解压文件 tar zxvf apache-hive-3.1.1-bin.tar.gz mv apache-hive-3.1.1 /op ...
- 多线程编程(一)-Semaphore(信号量)的使用
Semaphore的介绍 单词Semaphore的中文含义就是信号.信号系统的意思,此类的主要作用就是限制线程并发的数量. 举个例子,一个屋子里有10个人,但只有一个窄门可以出去,这个窄门一次最多只能 ...
- tomcat 控制台乱码问题
环境:win7 + tomcat 8.5 问题描述:web端一切正常,不管是返回页面的数据还是控制台打印的日志,都没乱码,给app提供的api接口返回乱码,然后就去百度,像什么 在tomcat的ser ...
- IOS折线图二
上周把项目的折线图给做了下,今天想着把它完善完善,自己设置了不同的数据源来测试,哈哈,还真遇到问题了, 就是给图表设置折点数为0时,视图显示的还是原来的,由于数据为空,应该将其设置为空,所以想着怎么把 ...
- maven+tomcat热部署
1.首先修改tomcat安装目录下的conf文件夹中的tomcat-user.xml文件 <role rolename="manager-gui"/> <role ...
- Linux 服务器 MySql的安装和网站的发布
Linux安装MySql,并配置能通过自己的电脑连接服务器的数据库 昨天安装的MySql,今天上午配置MySql能使用本机连接服务器数据库,服务器时DigitalOcean的,提供了很全面很专业的文档 ...
- mysql8.0遇到删除外键的错误
错误信息:Cannot drop index 'energy_type_id': needed in a foreign key constraint 创建device表的信息 CREATE TABL ...
- 你所需要的sql数据库资料
sql语法的特点 1.没有"",所有的字符串都使用''包含 2.它的逻辑相等与赋值运算符一样都是= 如 if 1=1 3.不区别大小写,但是习惯函数上使用大写.所有与数据库 ...
- Qless 相关知识
Qless是一个基于redis的分布式任务架构.相关代码在 https://github.com/seomoz/qless 它是完全有lua实现的,依靠 redis 对lua的支持,http://ww ...