iOS Question iSVG doesn't display anything

Mike1970

Well-Known Member
Licensed User
Longtime User
Hi, i'm trying to use iSVG to increase the quality of the graphics element.
Unfortunatly with most .svg file the library fails. it doens't show nothing! Even if in browser it works.
I attach one of the file i want to use
 

Attachments

  • Risorsa 1.zip
    462 bytes · Views: 231

Semen Matusovskiy

Well-Known Member
Licensed User
Works fine with SVGKit-2.1.0, which I posted yesterday. Alone, what you need to change - a library (iSVG3x instead of iSVG) and a type of object (SVG3x instead of SVG)
Simulator Screen Shot - iPhone 11 Pro Max - 2020-02-18 at 18.06.43.png
 
Last edited:
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
No, you don't need to compile. I placed zip file on Google Disk. Windows: copy xml-file (in PC subfolder) to Libraries folder. Mac: copy three other files to Libs. Full analog of iSVG installation.

BTW, I already expand iSVG3x on my PC by some useful properties:
a) Width and Height return preferred size (from svg tag of source file)
b) KeepAspectRatio allows to preserve aspect ratio ( ImageView in this case should have Content Mode = CENTER, not FILL)
 
Last edited:
Upvote 0

Mike1970

Well-Known Member
Licensed User
Longtime User
No, you don't need to compile. I placed zip file on Google Disk. Windows: copy xml-file (in PC subfolder) to Libraries folder. Mac: copy three other files to Libs. Full analog of iSVG installation.
UUUUUUU it seems to work great. Now i will do a test that the other library fails.

update: the test fails, but at this point i think is a problem of an SVG in a button, because it appears waaayy darker, almost black (ex. white svg in a button shows dark gray)
 
Last edited:
Upvote 0

sorex

Expert
Licensed User
Longtime User
most of the time it's just a small issue in the svg so you can get it to work after modifying the svg a bit.

I used iSVG and it worked fine out of the box or with a minor tweak.
 
Upvote 0

Mike1970

Well-Known Member
Licensed User
Longtime User
most of the time it's just a small issue in the svg so you can get it to work after modifying the svg a bit.

I used iSVG and it worked fine out of the box or with a minor tweak.
yeah but.. to me is a big problem if I design something in illustrator and then it doesn't work all the time.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
that's because illustrator adds a lot of junk to it. try to clean it up with inkScape (free) or use that from the start.
 
Upvote 0

Mike1970

Well-Known Member
Licensed User
Longtime User
that's because illustrator adds a lot of junk to it. try to clean it up with inkScape (free) or use that from the start.
I tried. nothing changed to me.
It doensn't work even for certain icons downloaded from iconfinder.com
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
If to have a great wish, it's possible, for example, to save in SVG 1.0 format and to clean manually in text editor.
Of course, even last SVGKit-2.1.0 library is not so clever as Acrobat or webbrowsers, but it supports more tags than SVGKit-1.2.0. So more svg files will work without changes.
 
Upvote 0

Mike1970

Well-Known Member
Licensed User
Longtime User
If to have a great wish, it's possible, for example, to save in SVG 1.0 format and to clean manually in text editor.
Of course, even last SVGKit-2.1.0 library is not so clever as Acrobat or webbrowsers, but it supports more tags than SVGKit-1.2.0. So more svg files will work without changes.
infact it works very well!!
 
Upvote 0
Top