Skip to content
UIImageView category/subclass for playing GIF. Simple, high performance, low memory footprint.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
UIImageView-PlayGIF.xcodeproj bug修复,仅修复了YFGIFImageView: Oct 11, 2016
UIImageView-PlayGIF
UIImageView-PlayGIFTests
.gitignore Initial commit Mar 25, 2014
LICENSE
README.md
UIImageView-PlayGIF.podspec Bumping version to 1.0.5 Jul 14, 2015
screenshot2.gif Update demo and screenshots Apr 7, 2014
screenshot3.gif Update demo and screenshots Apr 7, 2014

README.md

UIImageView-PlayGIF

UIImageView category/subclass for playing GIF. Simple, high performance, low memory footprint.

Installation

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

Usage

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

or #import <UIImageView-PlayGIF/YFGIFImageView.h>

  • Parameters:
  •  Pass value to one of them:
    
  •  `- gifData` NSData from a GIF
    
  •  `- gifPath` local path of a GIF
    
  • Methods:
  •  `- 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

License

UIImageView-PlayGIF is available under the MIT license. See the LICENSE file for more info.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.