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 your Podfile.
  • 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.h into the controller where you want to use it. 添加上头文件
  • Create a JSAnimatedImagesView instance either via code, or in interface builder (by creating a UIView and changing its class to JSAnimatedImagesView). 通过代码创建出JSAnimatedImagesView的实例对象,或者通过IB
  • Set the data source property on the view (probably on the viewDidLoad method): 设置图片数据源即可
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:兼容性

  • JSAnimatedImagesView is compatible with iOS5.0+ 兼容iOS5.0+以上
  • JSAnimatedImagesView requires ARC. 需要开启ARC

[翻译] JSAnimatedImagesView的更多相关文章

  1. 《Django By Example》第五章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者@ucag注:大家好,我是新来的翻译, ...

  2. 《Django By Example》第四章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:祝大家新年快乐,这次带来<D ...

  3. [翻译]开发文档:android Bitmap的高效使用

    内容概述 本文内容来自开发文档"Traning > Displaying Bitmaps Efficiently",包括大尺寸Bitmap的高效加载,图片的异步加载和数据缓存 ...

  4. 【探索】机器指令翻译成 JavaScript

    前言 前些时候研究脚本混淆时,打算先学一些「程序流程」相关的概念.为了不因太枯燥而放弃,决定想一个有趣的案例,可以边探索边学. 于是想了一个话题:尝试将机器指令 1:1 翻译 成 JavaScript ...

  5. 《Django By Example》第三章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:第三章滚烫出炉,大家请不要吐槽文中 ...

  6. 《Django By Example》第二章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:翻译完第一章后,发现翻译第二章的速 ...

  7. 《Django By Example》第一章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:本人目前在杭州某家互联网公司工作, ...

  8. 【翻译】Awesome R资源大全中文版来了,全球最火的R工具包一网打尽,超过300+工具,还在等什么?

    0.前言 虽然很早就知道R被微软收购,也很早知道R在统计分析处理方面很强大,开始一直没有行动过...直到 直到12月初在微软技术大会,看到我软的工程师演示R的使用,我就震惊了,然后最近在网上到处了解和 ...

  9. ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第一章:创建基本的MVC Web站点

    在这一章中,我们将学习如何使用基架快速搭建和运行一个简单的Microsoft ASP.NET MVC Web站点.在我们马上投入学习和编码之前,我们首先了解一些有关ASP.NET MVC和Entity ...

随机推荐

  1. python-树形结构和遍历

    #!/usr/bin/python class TreeNode(object): def __init__(self,data = 0,left = None,right = None): self ...

  2. PHP之string之addslashes()函数使用

    addslashes (PHP 4, PHP 5, PHP 7) addslashes - Quote string with slashes addslashes - 使用反斜线引用字符串 Desc ...

  3. redis 集群的密码设置

    redis的密码设置有2种方式 1,  这个方法我没试 修改所有Redis集群中的redis.conf文件加入: masterauth passwd123 requirepass passwd123  ...

  4. 剑指offer(36-40)编程题

    两个链表的第一个公共结点 数字在排序数组中出现的次数 二叉树的深度 平衡二叉树 数组中只出现一次的数字 36.输入两个链表,找出它们的第一个公共结点. class Solution1 { public ...

  5. ssm项目启动,加载数据库连接池时卡住

    今天早上到公司启动项目的时候,加载数据库连接池时卡住,昨晚还好着呢,然后排查原因,最后发现是因为有一个mapper的xml配置文件中 <mapper namespace="com.mi ...

  6. NetXray

    NetXRay是由Cinco Networks公司开发的一个用于高级分组检错的软件,功能很强大.IP地址查询工具. 硬件要求 对硬件要求低,可运行常用的windows平台. 主要功能 1.监视网络状态 ...

  7. SQL Serever学习16——索引,触发器,数据库维护

    sqlserver2014数据库应用技术 <清华大学出版社> 索引 这是一个很重要的概念,我们知道数据在计算机中其实是分页存储的,就像是单词存在字典中一样 数据库索引可以帮助我们快速定位数 ...

  8. Azure 应用服务中的 API 应用、ASP.NET 和 Swagger 入门

    学习内容: 如何通过 Visual Studio 2015 中的内置工具在 Azure 应用服务中创建和部署 API 应用. 如何使用 Swashbuckle NuGet 包动态生成 Swagger ...

  9. 你所需要的sql数据库资料

     sql语法的特点  1.没有"",所有的字符串都使用''包含  2.它的逻辑相等与赋值运算符一样都是= 如 if 1=1  3.不区别大小写,但是习惯函数上使用大写.所有与数据库 ...

  10. 十六、curator recipes之DistributedIdQueue

    简介 curator实现了一种分布式ID队列,也是遵循FIFO原则,比普通队列新增的一个点是ID队列可以根据ID对队列元素进行操作,比如移除该元素. 官方文档:http://curator.apach ...