{"id":39035,"date":"2023-04-11T21:55:21","date_gmt":"2023-04-12T01:55:21","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=39035"},"modified":"2023-04-11T21:55:21","modified_gmt":"2023-04-12T01:55:21","slug":"svg-to-swiftui-converter","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2023\/04\/11\/svg-to-swiftui-converter\/","title":{"rendered":"SVG to SwiftUI Converter"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/quassum\/SVG-to-SwiftUI\">Antoni Silvestrovic<\/a> (via <a href=\"https:\/\/iosdevweekly.com\/issues\/601\">Dave Verwer<\/a>):<\/p>\n<blockquote cite=\"https:\/\/github.com\/quassum\/SVG-to-SwiftUI\"><p>Tool to convert SVG to SwiftUI&rsquo;s Shape structure. This approach is much more memory efficient than introducing a SVG library for rendering.<\/p><p>[&#8230;]<\/p><p>This repository is just a front-end wrapper over our <a href=\"https:\/\/github.com\/quassum\/svg-to-swiftui-core\">svg-to-swiftui-core<\/a> (<a href=\"https:\/\/www.npmjs.com\/package\/svg-to-swiftui-core\">npm link<\/a>) package.<\/p><p>[&#8230;]<\/p><p>To demonstrate this tool I created a thicc plus sign with rounded corners (created it in Sketch, so shapes from Sketch should work fine with this tool).\nIt&rsquo;s saved as <code>content\/demo-plus.svg<\/code> file in this repository. You can see below how it looks like in the browser, and how it looks like after converting into SwiftUI Shape.<\/p><\/blockquote>\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2023\/02\/24\/chatgpt-for-apple-platforms-development\/\">ChatGPT for Apple Platforms Development<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2016\/11\/05\/paintcode-3-leaves-the-mac-app-store\/\">PaintCode 3 Leaves the Mac App Store<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2013\/04\/18\/webcode-1-0\/\">WebCode 1.0<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Antoni Silvestrovic (via Dave Verwer): Tool to convert SVG to SwiftUI&rsquo;s Shape structure. This approach is much more memory efficient than introducing a SVG library for rendering.[&#8230;]This repository is just a front-end wrapper over our svg-to-swiftui-core (npm link) package.[&#8230;]To demonstrate this tool I created a thicc plus sign with rounded corners (created it in Sketch, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2023-04-12T01:55:24Z","apple_news_api_id":"2eb7e574-55eb-49b3-958a-48aa6c9ca131","apple_news_api_modified_at":"2023-04-12T01:55:24Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/ALrfldFXrSbOVikiqbJyhMQ","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[888,31,2185,30,2223,74,71,586,901,1812],"class_list":["post-39035","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-code-generation","tag-ios","tag-ios-16","tag-mac","tag-macos-13-ventura","tag-opensource","tag-programming","tag-svg","tag-swift-programming-language","tag-swiftui"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/39035","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=39035"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/39035\/revisions"}],"predecessor-version":[{"id":39036,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/39035\/revisions\/39036"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=39035"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=39035"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=39035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}