Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image is displayed way too big #157

Open
Schnodderbalken opened this issue Oct 16, 2019 · 1 comment
Open

Image is displayed way too big #157

Schnodderbalken opened this issue Oct 16, 2019 · 1 comment

Comments

@Schnodderbalken
Copy link

Schnodderbalken commented Oct 16, 2019

Description of the Issue
I have an SVG image which I load from a URL and position with programmatically with translatesAutoresizingMaskIntoConstraints = false and NSLayoutConstraints. If I use a usual UIImageView (with a static rendered image) then everything is fine. Using an SVGView creates the mentioned problem (see screenshot below).

Sample SVG
https://www.patavinus.com/static/images/company-logos/5/logo.svg

Screenshots
Using SVGView: https://pasteboard.co/ICdMugc.png
Using UIImageView: https://pasteboard.co/ICdMPfA.png

@Sebulec
Copy link

Sebulec commented Oct 24, 2019

@Schnodderbalken did you try setting boundingBox to your SVGView object?
eg.
let svgView = UIView(URL: url) { (svgLayer) in svgLayer.boundingBox = CGRect(x: 0, y: 0, width: 300, height: 300) }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants