What does Auto Scaling do in Xcode 10 xcasset image properties
Asked Answered
E

1

6

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

Epigeous answered 12/8, 2018 at 21:51 Comment(0)
A
4

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.

Alfilaria answered 25/10, 2018 at 18:50 Comment(1)
More specifically, it appears this attribute causes the PDF to scale to 91% on a 38mm watch, 100% on a 40mm and 42mm watch, and 110% on a 44mm watch.Traprock

© 2022 - 2024 — McMap. All rights reserved.