Comments (5)
As far as I understand, "SVG support" in iOS means that one can use SVG assets -- but they are still converted to an internal format at build time and there is no SVG runtime support at all (and not planned as far as I am aware?). So a SVG library will be important for the time being for displaying dynamically created or downloaded SVG content.
from swiftsvg.
Hi @freak4pc, thanks for the message! I admit that I've fallen a bit behind on maintaining this. I actually had some plans to swap out the rendering with something more robust, but with the recent announcements of native SVG support, things are a bit in the air.
I know that that support starts with iOS 13, so maybe I can try and help you in the meantime. Do you have an example SVG I can take a look at and I can get back to you?
from swiftsvg.
To be totally honest, I haven't tested the framework yet. I wanted to know if there's anyone looking into the code or is it entirely unmaintained.
I'll run some tests with our assets and see how it looks :)
Thanks!
from swiftsvg.
@mchoe
I tried some basic assets and the main issue I'm seeing is that the frame of the SVG isn't always respected. For example this has a bounding box of 24x24 in the SVG itself, but leaks out of that area if I use a UIImageView
of that size:
Here's the SVG. Maybe you'll spot something we're doing wrong:
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>545DB722-F3FC-4742-9238-9837CA0EE22B</title>
<g id="Iconography" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-180.000000, -837.000000)" fill="#273238" id="Group-6">
<g transform="translate(100.000000, 229.000000)">
<g id="Group-10" transform="translate(32.000000, 32.000000)">
<g transform="translate(0.000000, 48.000000)">
<g id="Operation-/-Arrows-/-Boxed-/-Arrow-Down-Boxed" transform="translate(48.000000, 528.000000)">
<path d="M15,3 C18.3137085,3 21,5.6862915 21,9 L21,15 C21,18.3137085 18.3137085,21 15,21 L9,21 C5.6862915,21 3,18.3137085 3,15 L3,9 C3,5.6862915 5.6862915,3 9,3 L15,3 Z M12,7 C11.4871642,7 11.0644928,7.38604019 11.0067277,7.88337887 L11,8 L11,13.585 L9.70710678,12.2928932 L9.61289944,12.2097046 C9.22060824,11.9046797 8.65337718,11.9324093 8.29289322,12.2928932 C7.93240926,12.6533772 7.90467972,13.2206082 8.20970461,13.6128994 L8.29289322,13.7071068 L11.2928932,16.7071068 L11.336853,16.7485042 L11.336853,16.7485042 L11.4046934,16.8036654 L11.4046934,16.8036654 L11.5159379,16.8753288 L11.5159379,16.8753288 L11.628664,16.9287745 L11.628664,16.9287745 L11.734007,16.9641549 L11.734007,16.9641549 L11.8833789,16.9932723 L12,17 L12.1174626,16.9931674 L12.1174626,16.9931674 L12.2335141,16.9725773 L12.2335141,16.9725773 L12.3416665,16.9401054 L12.3416665,16.9401054 L12.4232215,16.9063266 L12.4232215,16.9063266 L12.5207088,16.8540045 L12.5207088,16.8540045 L12.6128994,16.7902954 L12.7071068,16.7071068 L12.7071068,16.7071068 L15.7071068,13.7071068 L15.7902954,13.6128994 C16.0699015,13.2532992 16.0699015,12.7467008 15.7902954,12.3871006 L15.7071068,12.2928932 L15.6128994,12.2097046 C15.2532992,11.9300985 14.7467008,11.9300985 14.3871006,12.2097046 L14.2928932,12.2928932 L13,13.585 L13,8 L12.9932723,7.88337887 C12.9355072,7.38604019 12.5128358,7 12,7 Z" id="Shape"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
from swiftsvg.
For today, there is no SVG support via code, I think work should be continued
from swiftsvg.
Related Issues (20)
- Switch example project to use SPM instead of Cocoapods
- Conflicting with Floaty
- Is it possible to convert UIBezierPath to SVG ? HOT 1
- pod try SwiftSVG - fails to build 11.5
- Is there a way to parse layer path back to string path? HOT 1
- Fill:"None" not working, fills as black color HOT 13
- Problems with Command ("M") HOT 1
- Why do I have to comment this code so that the picture can be displayed on iOS? HOT 1
- The image size can not change
- SVG having multi grouping is not rendring properly
- The documentation link in README.md seems to be dead HOT 1
- resizeToFit ignores viewBox HOT 2
- Messy Xcode log HOT 1
- Support style element
- crash : CurveTo.execute HOT 1
- SVG Animation
- file-write-create error prevents compile HOT 1
- SwiftSVG cannot be build in macOS app with macOS 14 SDK
- Any plan to support Vision OS?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftsvg.