SDWebImage方法:
? ? ? ? ? ? let imageView =UIImageView(frame: CGRect(x:0, y:0, width: BGVIEW_WIDTH, height: BGVIEW_WIDTH))
? ? ? ? ? ? imageView.image=UIImage.sd_animatedGIF(with: gifDataas!Data)
Kingfisher:直接用加載網(wǎng)絡(luò)的方法加載即可
????????let path =Bundle.main.path(forResource:"loading", ofType:"gif")
? ? ? ? let image =UIImageView(frame: CGRect(x:0, y:0, width: BGVIEW_WIDTH, height: BGVIEW_WIDTH))
? ? ? ? image.kf.setImage(with:ImageResource(downloadURL:URL(fileURLWithPath: path!)))
如有問(wèn)題诅诱,請(qǐng)聯(lián)系我們丧失。