UIImageView-PlayGIF 1.0.5

UIImageView-PlayGIF 1.0.5

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最后发布2016年11月

yfme 维护。



  • yfme

UIImageView 类别/子类,用于播放 GIF。简单、高性能、内存占用低。

安装

pod 'UIImageView-PlayGIF', '~> 1.0.1'

使用

#import <UIImageView-PlayGIF/UIImageView+PlayGIF.h>

#import <UIImageView-PlayGIF/YFGIFImageView.h>

  • 参数
    • 传递值给其中之一
    • - gifData 来自 GIF 的 NSData
    • - gifPath GIF 的本地路径
  • 方法
    • - startGIF
    • - stopGIF
    • - isGIFPlaying

//
//  UIImageView+PlayGIF.h
//  UIImageView-PlayGIF
//
//  Created by Yang Fei on 14-3-25.
//  Copyright (c) 2014年 yangfei.me. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import <ImageIO/ImageIO.h>

@interface UIImageView (PlayGIF)
@property (nonatomic, strong) NSString          *gifPath;
@property (nonatomic, strong) NSData            *gifData;
@property (nonatomic, strong) NSNumber          *index,*frameCount,*timestamp;
- (void)startGIF;
- (void)stopGIF;
- (BOOL)isGIFPlaying;
@end
//
//  YFGIFImageView.h
//  UIImageView-PlayGIF
//
//  Created by Yang Fei on 14-3-26.
//  Copyright (c) 2014年 yangfei.me. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import <ImageIO/ImageIO.h>

@interface YFGIFImageView : UIImageView
@property (nonatomic, strong) NSString          *gifPath;
@property (nonatomic, strong) NSData            *gifData;
- (void)startGIF;
- (void)stopGIF;
- (BOOL)isGIFPlaying;
@end

许可证

UIImageView-PlayGIF 可在 MIT 许可证下使用。有关更多信息,请参阅 LICENSE 文件。