GithubHelp home page GithubHelp logo

borderx-lab-leven / uiimageview-playgif Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yfme/uiimageview-playgif

0.0 0.0 0.0 3.9 MB

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

License: MIT License

Ruby 2.17% Objective-C 97.83%

uiimageview-playgif's Introduction

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.

uiimageview-playgif's People

Contributors

yfme avatar stephencelis avatar akteamyang avatar mshibuya avatar vogonistic avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.