Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想了解我们如何知道 Apple Watch 是 38 毫米还是 42 毫米,以便我可以以编程方式设置 UI 元素的图像。
我在WKInterfaceDevice课堂上发现了
WKInterfaceDevice
NSLog(@"%@", CGRectCreateDictionaryRepresentation([WKInterfaceDevice currentDevice].screenBounds));
42mm { 高度 = 195; 宽度 = 156;X = 0; Y = 0; }
38mm { 高度 = 170; 宽度 = 136;X = 0; Y = 0; }