IOS Gif Rendering Engine Flanimatedimage-b

Source: Internet
Author: User

The company's project has a home page to load a git diagram of about 2M, just do when the use of Sdwebimage inside the method:

+ (UIImage *)sd_animatedGIFNamed:(NSString *)name;+ (UIImage *)sd_animatedGIFWithData:(NSData *)data;

The use of this method after the discovery of a rapid increase in memory 300M, on the internet to find some methods:

//在didReceiveMemoryWarning方法中释放SDImage的缓存即可!- (void)didReceiveMemoryWarning {        [superdidReceiveMemoryWarning];    // Dispose of     any resources that can be recreated.        [[SDWebImageManagersharedManager]cancelAll];        [[SDImageCachesharedImageCache]clearDisk];}

But after using it, the results were not obvious, so the flanimatedimage was used.

Flanimatedimage is an engine that renders Gif animations for IOS.

Function:

    • Multiple GIFs can be played simultaneously

      Animation, speed comparable to desktop browser

    • Variable Frame delay

    • Low memory footprint

    • Can eliminate or block delay on first loop playback

    • Animation Frame Latency resolution performance comparable to browser

Example code:

FLAnimatedImage *image = [FLAnimatedImage animatedImageWithGIFData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif"]]]; FLAnimatedImageView *imageView = [[FLAnimatedImageView alloc] init]; imageView.animatedImage = image; imageView.frame = CGRectMake(0.0, 0.0, 100.0, 100.0); [self.view addSubview:imageView];

:

IOS Gif Rendering Engine Flanimatedimage-b

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.