Open schwindt opened 6 years ago
Hi @schwindt, can you please provide an example SVG? Thanks.
Disclaimer: I'm very very new to iOS programming. However I experienced something akin that looks as if the "promise" of auto-scaled views is not fulfilled.
I would expect the used SVG to be rendered into the SVGView. Instead only the marker I placed in the lower corner is shown. If I remove the constraints the SVG is shown, but full scale.
You can find the project here
https://github.com/deets/deets-fpv-vtx-scanner/tree/master/VTX%20Scanner
if that helps you.
Same here. Example image: https://www.patavinus.com/static/images/company-logos/5/logo.svg
I have a SVGView with fixed height and width constraints which are just ignored. The svg file will be shown just in original size, in my case 1024 X 1024. If I don't use the SVGView and a UIView instead an do this
let svgView = UIView(SVGNamed: "entrance") { (svgLayer) in svgLayer.resizeToFit(self.testView.bounds) } svgView.backgroundColor = UIColor.blue self.testView.addSubview(svgView)
It's working.