标签:des style blog http color io os 使用 ar
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:使用
pod ‘JSAnimatedImagesView‘, ‘~> 1.0.‘
to your Podfile
.-- or --
$ git clone git@github.com:JaviSoto/JSAnimatedImagesView.git
$ git submodule update --init
JSAnimatedImagesView.(h/m)
onto your project. 将这两个文件JSAnimatedImagesView.(h/m)拖入到你的工程项目当中Dependencies/MSWeakTimer/MSWeakTimer.(h/m)
onto your project. 将这两个文件/MSWeakTimer/MSWeakTimer.(h/m)拖入到你的工程项目当中JSAnimatedImagesView.h
into the controller where you want to use it. 添加上头文件JSAnimatedImagesView
instance either via code, or in interface builder (by creating a UIView and changing its class to JSAnimatedImagesView
). 通过代码创建出JSAnimatedImagesView的实例对象,或者通过IBviewDidLoad
method): 设置图片数据源即可self.animatedImagesView.dataSource = self;
@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
@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.
精确设置淡入淡出的时间间隔
JSAnimatedImagesView
is compatible with iOS5.0+ 兼容iOS5.0+以上JSAnimatedImagesView
requires ARC. 需要开启ARC
标签:des style blog http color io os 使用 ar
原文地址:http://www.cnblogs.com/YouXianMing/p/3978588.html