mirror of
https://github.com/zhigang1992/PINRemoteImage.git
synced 2026-06-10 07:10:08 +08:00
29 lines
577 B
Objective-C
29 lines
577 B
Objective-C
//
|
|
// PINAlternateRepresentationProvider.m
|
|
// Pods
|
|
//
|
|
// Created by Garrett Moon on 3/17/16.
|
|
//
|
|
//
|
|
|
|
#import "PINAlternateRepresentationProvider.h"
|
|
|
|
#import "NSData+ImageDetectors.h"
|
|
#if USE_FLANIMATED_IMAGE
|
|
#import <FLAnimatedImage/FLAnimatedImage.h>
|
|
#endif
|
|
|
|
@implementation PINAlternateRepresentationProvider
|
|
|
|
- (id)alternateRepresentationWithData:(NSData *)data options:(PINRemoteImageManagerDownloadOptions)options
|
|
{
|
|
#if USE_FLANIMATED_IMAGE
|
|
if ([data pin_isGIF]) {
|
|
return [FLAnimatedImage animatedImageWithGIFData:data];
|
|
}
|
|
#endif
|
|
return nil;
|
|
}
|
|
|
|
@end
|