[翻译] 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 ...
随机推荐
- 查看tomcat部署的项目名
Myeclips的查看方法 项目名右键-->properties-->Myeclips-->deployment 这里虽然可以改这个路径的项目名 但是一般不建议更改 避免出现未知错误 ...
- TortoiseGit学习系列之Windows上TortoiseGit的安装详解(图文)
不多说,直接上干货! TortoiseGit的安装准备 首先你得安装windows下的msysgit. 安装版本控制器客户端TortoiseGit [不习惯英文的朋友,也可以下个语言包]. 下载地址: ...
- redis集群的搭建详细教程
1 Redis-cluster架构图 redis-cluster投票:容错 (至少要三个才可以,才能超过半数) 架构细节: (1)所有的redis节点彼此互联(PING-PO ...
- git push.default 几种设置笔记
1 simple ,本地和远程分支同名才会推送,只会推送当前的分支到远程 ,默认推送分支数量:1 2 matching , 会推送匹配的本地分之到远程分之,假如本地有的分支远程没有,不会把本地推送到远 ...
- http协议与他的三次握手和四次挥手
http:超文本传输协议,在客户端与服务端之间传输信息,客户端发送html,css给服务器,服务器返回源码给客户端: https:是一种更安全的传输协议,在协议上加了一层密码,不容易被黑客攻击,更加安 ...
- [心平气和读经典]The TCP/IP Guide(001)
The TCP/IP Guide[Page 40,41] Introduction To the TCP/IP Guide | TCP/IP指南概述 As I sit here writing thi ...
- module使用和设置
Modules environmentDescription This is a system that allows you to easily change between different v ...
- 【LeetCode题解】349_两个数组的交集
目录 [LeetCode题解]349_两个数组的交集 描述 方法一:两个哈希表 Java 实现 类似的 Java 实现 Python 实现 类似的 Python 实现 方法二:双指针 Java 实现 ...
- 和为S的连续正数序列★★
题目描述 小明很喜欢数学,有一天他在做数学作业时,要求计算出9~16的和,他马上就写出了正确答案是100.但是他并不满足于此,他在想究竟有多少种连续的正数序列的和为100(至少包括两个数).没多久,他 ...
- Logback学习笔记
Logback介绍 Logback 分为三个模块:Core.Classic 和 Access.Core模块是其他两个模块的基础. Classic模块扩展了core模块. Classic模块相当于log ...