0

如果我创建 UIImage 并使用 WKInterfaceImage 显示它,它总是将图像显示为@1x 而不是@2x,从而导致像素化图像。它在 watchOS 1 上运行良好。如何使用 watchOS 2 解决此问题?相同的代码在带有 UIImageView 的 iOS 上运行良好。

4

1 回答 1

0

NSData这是从Apple Watch 上的对象以正确的屏幕比例创建图像的解决方案。

UIImage *image = [UIImage imageWithData:imageData scale:[[WKInterfaceDevice currentDevice] screenScale]];
于 2015-11-07T04:33:38.247 回答