gpt4 book ai didi

uiimage - Auto Scaling 在 Xcode 10 xcasset 图像属性中做什么

转载 作者:行者123 更新时间:2023-12-04 15:17:38 25 4
gpt4 key购买 nike

在 Xcode 10 中的 xcasset 目录图像属性上找到了名为“Auto Scaling”的新选项。

这个属性有什么作用?

使用 PDF 矢量 Assets 时是否与调整大小有关:“保留矢量数据”?

enter image description here

最佳答案

看起来这只能由 WatchOS 使用。

来自 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.



我不确定这是否也适用于 iOS。在此 WatchKit 文档之外,我找不到任何关于自动缩放的提及。

关于uiimage - Auto Scaling 在 Xcode 10 xcasset 图像属性中做什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51813141/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com