1

I am using svgkit, I am able to show svg image in the cell of UICollectionView via adding the svg image to SubView, but it gives me a buggy output, when I scroll up or down the images are getting added to cell making it plastered in the cells, and it also shows the wrong svg in every cell whenever I scroll up or down the UICollectionView, is there a way I could fix that bug? Thanks!

jane
  • 309
  • 2
  • 11

1 Answers1

0

It takes some time for SVGKit to draw your desired image. If you scroll quickly the image drawn may no longer correspond as the cell may got reused for a different indexPath.

The solution is the same as when you load remote images (https://stackoverflow.com/a/37784212/1049134) which is also isn't instantaneous.

Community
  • 1
  • 1
Rivera
  • 10,792
  • 3
  • 58
  • 102