数码皇冠的监控价值? (观看OS2)

Monitor value of Digital Crown? (Watch OS 2)

我想知道是否可以在我的 Apple Watch 上读取数字表冠的值。

我读到 WKInterfacePicker 使这成为可能,但我并不是真的要从列表中挑选一个项目,我想阅读 Digital Crown 并将该值用于应用程序内的某些内容。

例如横向移动视觉对象。

这可能吗?如果是,我该如何使用数码表冠?

我找到了一个 Apple Dev 论坛帖子:https://forums.developer.apple.com/message/7580#7580

用户 Svarrall 在当前 Watch 中解释了如何做到这一点 OS 2.

svarrall Jun 11, 2015 1:16 AM (in response to limtc) It should be possible indirectly. Use an InterfacePicker and add a dummy array to it with the same number of steps as the Slider, but don't show the picker in the interface (It's minimum dimensions seem to be 2x2, not sure if it's still accessible if it's Hidden, haven't tried) then in the Picker's @IBAction func pickerAction(value: Int) use that to update the value of the Slider to match. If you set the Picker's focus style to None and Indicator to Disabled then no-one needs to know it's there. In code setting picker.focusForCrownInput() will make it priority for input. The only issue I've seen with this, is if the Interface is longer than the screen the crown reverts to scrolling the page itself and not the picker. Oh and it's a bit slow to get the picker updates (on device, not simulator)

只是为了更新这个问题。在 WatchOS3 中,现在可以读取数字表冠的值。

Apple 推出了 WKCrownSequencer,为您提供皇冠状态的更新。