not working svg path string with style
DixPatel009 opened this issue · 1 comments
i have SVG path String like this :
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 186.71 187.57"><defs><style>.cls-1{fill:#e2bf29;}.cls-2{fill:#3e507d;}</style></defs><title>FINANCE_4_LOGO_10-2-22</title><g id="OBJECTS"><path class="cls-1" d="M176.28,53.26l-8,64.48-9.87-12.5c-12.18,14.17-47.36,57.17-104.5,43.94-22.13-5.12-35.47-16.26-43.37-28.7A89.79,89.79,0,1,0,176.28,53.26Z"/><path class="cls-2" d="M4.78,91.34a39.82,39.82,0,0,0,9.53,11.71V51.33A89.27,89.27,0,0,0,4.78,91.34Z"/><path class="cls-2" d="M21.07,40v67.55a43.59,43.59,0,0,0,14.33,4.54v-88A90.55,90.55,0,0,0,21.07,40Z"/><path class="cls-2" d="M42.17,18.7v93.92A62.22,62.22,0,0,0,56.5,111V10.29A90,90,0,0,0,42.17,18.7Z"/><path class="cls-2" d="M63.27,7.45V109.07a89.66,89.66,0,0,0,14.33-6.24V3.45A88.27,88.27,0,0,0,63.27,7.45Z"/><path class="cls-2" d="M94.54,1.84a90.2,90.2,0,0,0-10.18.58V98.85a125,125,0,0,0,14.33-10.7V2C97.32,1.89,95.94,1.84,94.54,1.84Z"/><path class="cls-2" d="M105.46,2.51V82a173.55,173.55,0,0,0,14.33-15.81V56l-10-12.66,10,1.11v-39A90.31,90.31,0,0,0,105.46,2.51Z"/><path class="cls-2" d="M126.56,7.73V45.19l14.33,1.59v-32A89.66,89.66,0,0,0,126.56,7.73Z"/><path class="cls-2" d="M147.65,19.25V47.54L162,49.14V32.38A89.69,89.69,0,0,0,147.65,19.25Z"/><path class="cls-2" d="M168.75,41.1v8.79l5.62.63A89.35,89.35,0,0,0,168.75,41.1Z"/><path class="cls-2" d="M5.78,99.67c14.38,28.86,78,37.82,127.64-36.78-1.41-1.63-9.36-10.7-9.36-10.7l44.32,5.45-4.47,43.05-6.27-8.45S127.21,135.93,87.09,142C34.41,150,11.21,117.3,7.68,111,6.94,106.7,5.78,99.67,5.78,99.67Z"/><path class="cls-1" d="M83.24,127.79c37.68-12.62,70.05-50.25,84.6-70.22l-43.78-5.38s7.95,9.07,9.36,10.71C83.81,137.49,20.16,128.53,5.78,99.67c0,0,.49,3,1,6.19C24.66,132.91,53.87,137.62,83.24,127.79Z"/></g></svg>
load this svg file like this :
let url = Bundle.main.url(forResource: "sample", withExtension: "svg")!
let svgImageView = SVGImageView.init(contentsOf: url)
svgImageView.frame = view.bounds
svgImageView.contentMode = .scaleAspectFit
view.addSubview(svgImageView)
but not working.
Specifications
- PocketSVG Version: latest
- Xcode Version: 13.2.1
- iOS/macOS Version: iOS 15.2
<style>
s are not supported are not supported