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. mp3转speex的一些研究(貌似不能播放,暂存着)

    思路是,先从mp3中提取pcm(raw原始数据),再将原始数据转成speex. 貌似不能播放,可能还存在其他问题,需要继续研究. 使用了两个类库NSpeex和NAudio using (var wav ...

  2. JavaScript设计模式-21.命令模式

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  3. 微服务Kong(七)——CLI参考

    KONG提供了一套CLI(命令行界面)命令,您可以通过它来启动.停止和管理您的Kong实例.CLI管理您的本地节点(如在当前机器上). 全局配置 所有命令都采用一组指定的可选标志作为参数: --hel ...

  4. Struts2 数据驱动

    在servlet中获取页面传递过来的数据的方式是:request.getParameter(“username”);这个代码可以获取到页面的username的数据.在action中可以通过属性驱动的方 ...

  5. MYSQL数据库的日志文件

    日志文件:用来记录MySQL实例对某种条件做出响应时写入的文件.如错误日志文件.二进制日志文件.慢查询日志文件.查询日志文件等. 错误日志 show variables like 'log_error ...

  6. [PY3]——IO——文件读写

    文件打开和关闭 # 使用open 打开文件,返回时值是一个 File-like对象 f.open('/test/file') # 使用read读取文件 f.read( ) # 使用close关闭文件 ...

  7. Java SPI

    一.什么是Java SPI? SPI的全名为Service Provider Interface.大多数开发人员可能不熟悉,因为这个是针对厂商或者插件的.在java.util.ServiceLoade ...

  8. xcopy命令的其他参数

    xcopy /s /e /h "c:\123" "D:\123\" 后面多一个斜杠,让程序知道是目录 以下还给您提供了 xcopy 命令的其他参数: /A 仅复 ...

  9. ASP.NET HttpWebRequest和HttpWebResponse

    HttpWebRequest和HttpWebResponse类是用于发送和接收HTTP数据的最好选择.它们支持一系列有用的属性. 模拟艺龙旅游网登录 想模拟登录,首先整理一下流程 1.通过360浏览器 ...

  10. jquery appendTo用法

    $("#top_cartWarp").appendTo($("#top_main_right")).css('position','relative').css ...