#import <AssetsLibrary/AssetsLibrary.h>
1、引用库
2、将GIF图片转为NSData类型
3、存储代码
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; [library writeImageDataToSavedPhotosAlbum:data metadata:nil completionBlock:^(NSURL *assetURL, NSError *error) { NSLog(@"Success at %@", [assetURL path] ); }];