개발/xcode

How to use SVG Assets?

lemonade 2020. 12. 10. 10:00
반응형

Xcode 12 introduced support for using Scalable Vector Graphic (SVG) image assets in iOS, macOS, and iPadOS.

 

Until xcode 12, you were able to use single scale resources by using PDF assets.

 

Note that SVG assets are only supported on macOS 10.15 or later, iOS 13 or later, and iPadOS or later. 

 

Using SVG images in Xcode is pretty easy.

 

Just change scales option to Single Scale!

 

Default value is Individual Scale.

 

 

After change to single scale!

 

You can use svg image assets.

 

 

 

SVG assets might not appropriate for all your assets.

 

Rich assets like images with lots of details should still be defined as individual scales.

 

But for images like logo, icons, or symbols, SVG assets could be better choice.

 

Happy Coding :)

 

반응형
그리드형

'개발 > xcode' 카테고리의 다른 글

Xcode Mark lines : comment  (0) 2020.12.20
How to localize info.plist  (0) 2020.11.06