使用SDWebImage加载Gif
2021-03-17 本文已影响0人
Arackboss
'''
UIImageView *bgImageView = [[UIImageView alloc] init];
NSString *path = [[NSBundle mainBundle] pathForResource:@"icon_home" ofType:@"gif"];
NSData *data = [NSData dataWithContentsOfFile:path];
UIImage *image = [UIImage sd_imageWithData:data];
bgImageView.image = image;
'''