在 WKInterfaceController 中查找 WKInterfaceImage 的像素大小
Find pixel size for WKInterfaceImage in WKInterfaceController
我在 WKInterfaceController
中有一个 WKInterfaceImage
,我正在动态生成 UIImage
以显示在 WKInterfaceImage
中。如何找到可以在图像 WKInterfaceController
中显示的最大像素尺寸?
使用 WKInterfaceDevice
的 screenBounds
和 screenScale
属性获取可用的屏幕尺寸和比例。
结合您对应用程序用户界面的了解来确定正确的图像尺寸。请记住,WatchKit 应用程序会垂直滚动,但不会水平滚动。
我在 WKInterfaceController
中有一个 WKInterfaceImage
,我正在动态生成 UIImage
以显示在 WKInterfaceImage
中。如何找到可以在图像 WKInterfaceController
中显示的最大像素尺寸?
使用 WKInterfaceDevice
的 screenBounds
和 screenScale
属性获取可用的屏幕尺寸和比例。
结合您对应用程序用户界面的了解来确定正确的图像尺寸。请记住,WatchKit 应用程序会垂直滚动,但不会水平滚动。