Xcode 10 中新的 Apple Watch "Home Screen" 和 "Short Look" 图像资产尺寸是多少?
What are the new Apple Watch "Home Screen" and "Short Look" image asset dimensions in Xcode 10?
Apple Watch Series 4 的新尺寸为 40mm 和 44mm,Xcode10 在 "Home Screen" 和 "Short Look" 下为它们提供了新的 .xcassets 图像槽:
这 3 种新资产的最佳图像尺寸是多少?
以下是所有新尺寸的顺序:
主屏幕(应用程序启动器)
40mm 2x:88x88 像素(44x44 逻辑像素)
44mm 2x:100x100 像素(50x50 逻辑像素)
短看(快看)
40mm 2x:196x196 像素(98x98 逻辑像素)
44mm 2x:216x216 像素(108x108 逻辑像素)
我是如何获得这些信息的?
如果您 select 应用程序图标集中的图像并打开属性检查器(右侧栏中的最后一个图标),您将获得有关该图像的一些信息,包括其大小:
如果您导航到 .xcassets 文件中的 AppIcon.appiconset/Contents.json
,您将获得一个适合所有尺寸的作弊 sheet:
[...]
{
"size" : "44x44",
"idiom" : "watch",
"scale" : "2x",
"role" : "appLauncher",
"subtype" : "40mm"
},
[...]
{
"size" : "50x50",
"idiom" : "watch",
"scale" : "2x",
"role" : "appLauncher",
"subtype" : "44mm"
},
[...]
{
"size" : "98x98",
"idiom" : "watch",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "42mm"
},
{
"size" : "108x108",
"idiom" : "watch",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "44mm"
},
[...]
Apple Watch Series 4 的新尺寸为 40mm 和 44mm,Xcode10 在 "Home Screen" 和 "Short Look" 下为它们提供了新的 .xcassets 图像槽:
这 3 种新资产的最佳图像尺寸是多少?
以下是所有新尺寸的顺序:
主屏幕(应用程序启动器)
40mm 2x:88x88 像素(44x44 逻辑像素)
44mm 2x:100x100 像素(50x50 逻辑像素)
短看(快看)
40mm 2x:196x196 像素(98x98 逻辑像素)
44mm 2x:216x216 像素(108x108 逻辑像素)
我是如何获得这些信息的?
如果您 select 应用程序图标集中的图像并打开属性检查器(右侧栏中的最后一个图标),您将获得有关该图像的一些信息,包括其大小:
如果您导航到 .xcassets 文件中的 AppIcon.appiconset/Contents.json
,您将获得一个适合所有尺寸的作弊 sheet:
[...] { "size" : "44x44", "idiom" : "watch", "scale" : "2x", "role" : "appLauncher", "subtype" : "40mm" }, [...] { "size" : "50x50", "idiom" : "watch", "scale" : "2x", "role" : "appLauncher", "subtype" : "44mm" }, [...] { "size" : "98x98", "idiom" : "watch", "scale" : "2x", "role" : "quickLook", "subtype" : "42mm" }, { "size" : "108x108", "idiom" : "watch", "scale" : "2x", "role" : "quickLook", "subtype" : "44mm" }, [...]