Is there a way to access the haptic feedback via WatchKit?

白昼怎懂夜的黑 提交于 2019-11-28 07:33:29

问题


I plan to create an Apple Watch app. Is there a way to access the haptic feedback via WatchKit?


回答1:


No there isn't. The following is from this post https://devforums.apple.com/thread/254540?tstart=15.

There is no access to these hardware features at this time, though there is presentation of a text input controller via WKInterfaceController, which will involve the microphone. Past that, I have no information concerning forthcoming releases.




回答2:


Yes. As of watchOS 2.0, you can give haptic feedback with the play() method method like this:

WKInterfaceDevice.currentDevice().play(.success)



回答3:


For now, the only way to give haptic feedback is by showing a notification.



来源:https://stackoverflow.com/questions/27050919/is-there-a-way-to-access-the-haptic-feedback-via-watchkit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!