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.