gpt4 book ai didi

apple-watch - 苹果 watch : How to know the screen size?

转载 作者:行者123 更新时间:2023-12-04 03:00:44 24 4
gpt4 key购买 nike

我想了解我们如何知道 Apple Watch 是 38 毫米还是 42 毫米,以便我可以以编程方式设置 UI 元素的图像。

最佳答案

我在 WKInterfaceDevice 中发现了它类(class)

NSLog(@"%@", CGRectCreateDictionaryRepresentation([WKInterfaceDevice currentDevice].screenBounds));

42mm
{
高度 = 195;
宽度 = 156;
X = 0;
Y = 0;
}

38mm
{
高度 = 170;
宽度 = 136;
X = 0;
Y = 0;
}

关于apple-watch - 苹果 watch : How to know the screen size?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28042934/

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