如何使用GIF
图像作为UIButton
图像背景?
UIImage *img1 = [UIImage imageNamed:@"btn_img1"];
UIImage *img2 = [UIImage imageNamed:@"btn_img2"];
UIImage *img3 = [UIImage imageNamed:@"btn_img3"];
// GIF ImageView
_btnGIF.imageView.animationImages = [[NSArray alloc] initWithObjects:img1, img2, img3, nil];
_btnGIF.imageView.animationDuration = 0;
[_btnGIF.imageView startAnimating];
//[_btnGIF setBackgroundImage:GIF forState:UIControlStateNormal];