Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 637 Bytes

readme.md

File metadata and controls

12 lines (9 loc) · 637 Bytes

How to use it?

Inspired from "https://github.com/kasatani/AnimatedGifExample". Use SCGIFImageView as a UIImageView to show a gif image with animation. since it's a subclass of UIImageView, it can also support other image formats that UIImageView support.

NSString* filePath = [[NSBundle mainBundle] pathForResource:@"1.gif" ofType:nil];
SCGIFImageView* gifImageView = [[[SCGIFImageView alloc] initWithGIFFile:filePath] autorelease];
gifImageView.frame = CGRectMake(0, 0, gifImageView.image.size.width, gifImageView.image.size.height);
gifImageView.center = self.view.center;
[self.view addSubview:gifImageView];