使用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;

'''

上一篇 下一篇

猜你喜欢

热点阅读