Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does Auto Scaling do in Xcode 10 xcasset image properties

Found new option on xcasset catalogue image property in Xcode 10 called "Auto Scaling".

What does this property do?

Is it in any way related to Resizing: "Preserve Vector Data" when using PDF vector assets?

enter image description here

like image 788
Vlad Avatar asked Aug 12 '18 21:08

Vlad


1 Answers

It looks like this may only be used by WatchOS.

From https://developer.apple.com/documentation/watchkit/supporting_multiple_screen_sizes?language=objc

Alternatively, in watchOS 5 and later, you can provide scalable PDF assets. Add a PDF as a 2x image asset, then set its Auto Scaling attribute to Automatic. When you load the PDF, the system scales the image based on the current device’s screen size as listed in the table. This allows you to provide a single asset for all four screen sizes.

I'm not sure if this works on iOS as well. I was unable to find any mention of auto scaling outside of this WatchKit documentation.

like image 71
AnthonyMDev Avatar answered Nov 02 '22 06:11

AnthonyMDev