问题描述:

i use this SwiftGif library. I put some gif into UIImageView. This is my code:

dispatch_async(dispatch_get_main_queue(),{

self.img1.image=UIImage.gifWithURL("http://mywebsite/img1.gif")

self.img2.image=UIImage.gifWithURL("http://mywebsite/img2.gif")

self.img3.image=UIImage.gifWithURL("http://mywebsite/img1.gif")

})

The gifs are shown correctly but the animation is slow. How can I fix this? Thanks!

网友答案:
I assume that your gif file size is too big? or the time is too long? because SwiftGif is base on UIAnimatedImage.

And also control your gif frame of 9, 10, 20, 30, 40, and setup GCD to 1.

相关阅读:
Top