2

Why does this .gif Image In UItabbarItem on iOS 13 show blue color?

tabBarItem.selectedImage is .gif image.

viewController.tabBarItem.selectedImage = gifImage.

The gif image on iOS 13 looks blue color. (Maybe is iOS image default render color)

The gif image on iOS 12 is well.

How to resolve this on iOS 13?

jiexishede
  • 2,473
  • 6
  • 38
  • 54

2 Answers2

0

Definitely SDWebImage library is at fault here. You can try to update it to the newest version and if this doesn't help you need to use something else to load animated gif. I was able do do it with success with help of this file.

Just removed

import ImageIO

line and removed compiler errors with optionals (used suggested fixes). Good luck!

Adam Tucholski
  • 1,067
  • 11
  • 27
0

Is GIF animated or static?

My first bet would be to make it 1 frame only by using:

+ (nullable UIImage *)sd_imageWithData:(nullable NSData *)data
                                 scale:(CGFloat)scale
                        firstFrameOnly:(BOOL)firstFrameOnly;

Sources worth checking:

vol
  • 1,594
  • 11
  • 16