2
如何以编程方式在WKInterfaceController
中查找状态栏的高度?WatchKit中状态栏的高度
我试图找到WKInterfaceController
的可见区域,所以[WKInterfaceDevice currentDevice].screenBounds.size.height
- (status bar height)
。
如何以编程方式在WKInterfaceController
中查找状态栏的高度?WatchKit中状态栏的高度
我试图找到WKInterfaceController
的可见区域,所以[WKInterfaceDevice currentDevice].screenBounds.size.height
- (status bar height)
。
要获取当前设备尺寸,请使用[WKInterfaceDevice currentDevice].screenBounds)
。因此,您需要从整个屏幕边界减去视图的内容框架,并且您将获得状态栏大小。
注意:这会,如果你不使用基于页面的导航
的工作似乎不会38px两个手表。 – Rivera 2015-04-07 20:49:48
我得到38分38分(38px)和42分42分(42px)。 – 2015-04-29 00:13:33