当您使用 Objective-C 和 Xcode 按下按钮时,如何在 Apple Watch 上进行触觉播放。
问问题
1394 次
2 回答
6
目标-C:
[[WKInterfaceDevice currentDevice] playHaptic:WKHapticType.Success]
迅速:
WKInterfaceDevice.currentDevice().playHaptic(.Success)
您可以玩的触觉类型:
WKHapticType.Notification,
WKHapticType.DirectionUp,
WKHapticType.DirectionDown,
WKHapticType.Success,
WKHapticType.Failure,
WKHapticType.Retry,
WKHapticType.Start,
WKHapticType.Stop,
WKHapticType.Click
于 2016-01-24T21:30:36.027 回答
3
至少在objective-c的Xcode 11中你会做(Xcode 11)
[[WKInterfaceDevice currentDevice] playHaptic: WKHapticTypeSuccess];
于 2019-09-06T20:36:34.087 回答