NSString *filePath = [[NSBundle bundleWithPath:[[NSBundle mainBundle] bundlePath]]pathForResource:@"fileName" ofType:@"gif"];
NSData *imageData = [NSData dataWithContentsOfFile:filePath];
UIImage *gif = [UIImage sd_animatedGIFWithData:imageData];
[button setImage:gif forState:UIControlStateNormal];
iOS 按钮添加gif
最新推荐文章于 2022-03-10 15:16:47 发布