我在WKInterfaceImage中有一个WKInterfaceController ,我正在动态生成UIImage以显示在WKInterfaceImage 。 如何找到我可以在WKInterfaceController显示的最大像素尺寸?
I have a WKInterfaceImage in a WKInterfaceController and I'm generating the UIImage dynamically to display in the WKInterfaceImage. How do I find the maximum pixel dimensions that I can display in the WKInterfaceController for the image?
最满意答案
使用WKInterfaceDevice的screenBounds和screenScale属性来获取可用的屏幕大小和比例。
将此与您对应用程序用户界面的了解相结合,以确定正确的图像大小。 请记住WatchKit应用程序垂直滚动但不是水平滚动。
Use WKInterfaceDevice's screenBounds and screenScale properties to get the available screen size and scale.
Combine this with your knowledge of your app's user interface to determine the correct image size. Remember that WatchKit apps scroll vertically but not horizontally.
更多推荐
发布评论