mchoe / SwiftSVG

A simple, performant, and lightweight SVG parser
Other
1.92k stars 229 forks source link

Fixed issue with cached SVGLayer #137

Closed zengadget closed 5 years ago

zengadget commented 5 years ago

This PR fixes issue with disappearing images (ticket #127).

The issue was that when SVGLayer was read from cache, the copy of the layer was not created.

So if same SVG icon was presented multiple times on the same screen it would be shown only once as SVGLayer got removed from previous UIViews because copies of the layer were not created (one instance of CALayer can be presented only inside one UIView)

mchoe commented 5 years ago

Thanks for the fix @matejukmar!